Share » Forums » Setup & design » ezpublish edit button for frontend...

ezpublish edit button for frontend editing of content items

ezpublish edit button for frontend editing of content items

Monday 07 March 2011 8:33:39 am - 4 replies

Author Message

Frédéric DAVID

Tuesday 08 March 2011 3:21:47 am

Hi,

to override publish redirection, you can add a hidden button in your edit form.

<input type="hidden" name="RedirectURIAfterPublish" value="your_custom_url" />

You have the same for discard. The button name will be RedirectIfDiscarded

Blog : http://www.frefred.fr/blog/ez-publish
feZ Meta Data : http://projects.ez.no/fezmetadata

nicholas king

Tuesday 08 March 2011 6:26:27 am

Hello Frederic,

I have tried this and it still redirects back to /

currently i have this code

<form method="post" action="/content/action" class="left">
<input type="hidden" name="ContentLanguageCode" value="eng-GB" /> <input type="image" src="/extension/ezwt/design/standard/images/websitetoolbar/ezwt-icon-edit.gif" name="EditButton" title="Edit:{$active_node.data_map.name.content}" /> <input type="hidden" name="HasMainAssignment" value="1" /> <input type="hidden" name="ContentObjectID" value="{$active_node.contentobject_id}" /> <input type="hidden" name="NodeID" value="{$active_node.node_id}" /> <input type="hidden" name="ContentNodeID" value="{$active_node.node_id}" /> <input type="hidden" name="ContentObjectLanguageCode" value="eng-GB" /> <input type="hidden" name="RedirectURIAfterPublish" value="{$active_node.path_identification_string}" /> <input type="hidden" name="RedirectIfDiscarded" value="{$active_node.path_identification_string}" /> </form>

Frédéric DAVID

Tuesday 08 March 2011 8:41:14 am

I think your form is wrong.

When you edit a objet ( content/edit ), the form action is content/edit, and not content/action like your example.

You have to do the change in your template template/content/edit.tpl ( override the template is the best way )

Blog : http://www.frefred.fr/blog/ez-publish
feZ Meta Data : http://projects.ez.no/fezmetadata

nicholas king

Wednesday 09 March 2011 2:28:36 am

Hello Frederic i have tried as you have suggested and still no success :-(, the page still redirects back to the home page. I don't really want to create a override template as the button i have created is already in wide use i would rather ammend my current template with the solution.

Thanks

Nicholas

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu