Content language and redirection POST variable cheatsheet documentation


You need to be logged in to get access to the forums. You can do so here

Author Message

Graham Brookins

Brookins Consulting | eZ Partner | http://brookinsconsulting.com/

Thursday 20 August 2009 8:10:59 pm - A couple more variables of interest ...

Here are a couple more examples of post actions to the content/action module view.

{def $discardRedirectNode=fetch( 'content', 'node', hash( 'node_id', $main_node_id ) )
            $publishRedirectNode=fetch( 'content', 'node', hash( 'node_id', $object.main_node_id ) )}
            <input type="hidden" name="RedirectURIAfterPublish" value="{$publishRedirectNode.url}" />
            <input type="hidden" name="RedirectIfDiscarded" value="{$discardRedirectNode.url}" />

<input class="button" type="submit" name="DiscardButton" value="{'Discard'|i18n('design/base')}" />
<input type="hidden" name="DiscardConfirm" value="0" />

<form method="post" action={"content/action/"|ezurl}>
<input class="button forum-new-topic" type="submit" name="NewButton" value="{'New topic'|i18n( 'design/base' )}" />
<input type="hidden" name="ContentNodeID" value="{$node.node_id}" />
<input type="hidden" name="ContentObjectID" value="{$node.contentobject_id.}" />
<input class="button forum-keep-me-updated" type="submit" name="ActionAddToNotification" value="{'Keep me updated'|i18n( 'design/base' )}" />
<input type="hidden" name="NodeID" value="{$node.node_id}" />
<input type="hidden" name="ClassIdentifier" value="forum_topic" />
<input type="hidden" name="ContentLanguageCode" value="eng-GB" />
<input type="hidden" name="ContentObjectLanguageCode" value="eng-GB" /></form>
<form method="post" action={'/content/action'|ezurl}>
<label>{'Location:'|i18n('design/wiki/pagelayout')}</label><br />
<input type="hidden" name="ClassID" value="{$createClassID}" />

<select name="NodeID">
{foreach $canCreateNamespaces as $namespace}
{if array( 'spotlight', 'template', 'snippets_for_ez_publish_3', 'historical', 'test_notifications', 'updated', 'new' )|contains( $namespace.url )|not}
<option value="{$namespace.node_id}">{$namespace.name|wash}</option>
{/if}
{/foreach}
</select>
<br />
<input class="button" type="submit" name="NewButton" value="{'Create article'|i18n('design/wiki/pagelayout')}" /></form>
{section show=$node.object.can_edit}
<form method="post" action={"content/action/"|ezurl}>
<input type="hidden" name="ContentObjectID" value="{$node.object.id}" /><input class="button forum-edit-reply" type="submit" name="EditButton" value="{'Edit'|i18n('design/base')}" /></form>{/section}


Cheers

Brookins Consulting | eZ Partner | http://brookinsconsulting.com/
https://github.com/brookinsconsulting
http://projects.ez.no/users/community/brookins_consulting
http://share.ez.no/members-compan...y-company-member/brookins-consulting

Graham Brookins

Brookins Consulting | eZ Partner | http://brookinsconsulting.com/

Thursday 20 August 2009 7:25:19 pm - Content language and redirection POST variable cheatsheet documentation

It seems that every few years I need to brush up on my long term retention of key eZ Publish redirection variables and how they work.

Variables of similar nature / needs.

Content language, discard draft and content on publish redirection cheatsheet documentation

Variables like these come to mind. I think a page about these would be very helpful.

<input type="hidden" name="RedirectURIAfterPublish" value="{$discardRedirectNode.url}" />
<input type="hidden" name="RedirectIfDiscarded" value="{$discardRedirectNode.url}" />


Re: http://ez.no/developer/forum/deve...er_discard/re_redirect_after_discard

Cheers

Brookins Consulting | eZ Partner | http://brookinsconsulting.com/
https://github.com/brookinsconsulting
http://projects.ez.no/users/community/brookins_consulting
http://share.ez.no/members-compan...y-company-member/brookins-consulting

You need to be logged in to get access to the forums. You can do so here