How do you pass variables through the object creation/publish machinery?

Author Message

nigel dodd

Friday 04 February 2005 3:22:57 am

Take the tscm example http://www.ez.no/ez_publish/documentation/building_an_ez_publish_site/the_guestbook/adding_an_action_button where a guestbook object is initially created using content/action with the NewButton input. This results in the appearance of an editing template for the user to fill in the various attribute values of the guestbook class. This can be overridden, as demonstrated in the documentation, to provide a bespoke editing form.

If I had a variable in the template containing the content/action form, how would I be able to pass this value to the edit template? The normal appending of /(myvariable)/myvalue to the url does not work here.

nigel dodd

Friday 04 February 2005 9:28:50 am

Use the hack
http://ez.no/community/contribs/hacks/one_click_new_object_and_publish_preview_hack
which eliminates the need for the two stage creation/publish of content/action NewButton and replaces it with a single stage where the relevant variables are available and can be inserted into attribute values.

I would suggest that a more fully coded version of this excellent "hack" finds its way into the release code. It needs extending to accomodate other variable types than just text variables. I shall endeavour to do so for integers and post the result.

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.