Thursday August 20 2009 06: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
7x | Formerly 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
|