Forums / Developer / edit an node

edit an node

Author Message

justin kazadi

Thursday 23 October 2008 2:02:46 am

hello all,

i have an file in which i have this code

{def $articles=fetch(content,list,hash(parent_node_id,2,

                                                                   class_filter_type,include,

                                                                   class_filter_array,array('myarticle')

                                                      )

                            )

}

<form method="post" action={'content/action'|ezurl()}>
            <select name="choix">

                   <option >choise an object</option>
                              {foreach $articles as $child}
                   <option value="{$child.node_id}">{$child.name|wash()}</option>
                               {/foreach}{undef $articles}

           </select>

 </form>  

i want to edit an node in the same template when an administrator or editor selected this object.
i don't know what can i do? i need some suggestion.
thanks in advance.

The theory is when we know everything and nothing works.
The practice is when everything works and nobody knows why.
If the practice and theory are met, nothing works and we do not know why.

Albert Einstein

Grégory BECUE

Thursday 20 November 2008 1:14:54 pm

I'm not sure to understand what you want to make but ...
If you want to use a template for editing a node, it's possible : frontend editing.

i think you must to complete your code with hidden field :

<form method="post" action={"content/action"|ezurl}>
<input type="hidden" name="ClassIdentifier" value="ged_fichier" />
<input type="hidden" name="ContentObjectID" value={$node.contentobject_id} />
<input type="hidden" name="ContentLanguageCode" value={ezini( 'RegionalSettings', 'Locale', 'site.ini')} />
<input class="button new_comment" type="submit" name="EditButton" value="Soumettre une nouvelle version" />
</form>

And it's very important to have an hidden field EditButton (or AddButton) >> see action file

Greg