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

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

eZ debug

Timing: Jan 18 2025 11:00:51
Script start
Timing: Jan 18 2025 11:00:51
Module start 'layout'
Timing: Jan 18 2025 11:00:51
Module start 'content'
Timing: Jan 18 2025 11:00:52
Module end 'content'
Timing: Jan 18 2025 11:00:52
Script end

Main resources:

Total runtime1.5176 sec
Peak memory usage4,096.0000 KB
Database Queries54

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0058 588.9063152.6094
Module start 'layout' 0.00580.0035 741.515639.3984
Module start 'content' 0.00931.5068 780.9141524.8125
Module end 'content' 1.51610.0015 1,305.726612.2031
Script end 1.5176  1,317.9297 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.2132160.0002
Check MTime0.00140.0902160.0001
Mysql Total
Database connection0.00090.062310.0009
Mysqli_queries1.471796.9760540.0273
Looping result0.00060.0370520.0000
Template Total1.483797.820.7418
Template load0.00220.144020.0011
Template processing1.481597.615820.7407
Template load and register function0.00010.005710.0001
states
state_id_array0.00130.086610.0013
state_identifier_array0.00280.182220.0014
Override
Cache load0.00170.1120170.0001
Sytem overhead
Fetch class attribute can translate value0.00110.070420.0005
Fetch class attribute name0.00110.070730.0004
XML
Image XML parsing0.00050.032720.0002
class_abstraction
Instantiating content class attribute0.00000.000430.0000
General
dbfile0.00090.0568160.0001
String conversion0.00000.000540.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
4content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 13
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs