edit and view parameters

Author Message

laurent le cadet

Tuesday 06 November 2007 10:43:58 am

Hi,

I just can write (as it's no really documented) the correct syntaxe for an edit form mix with view parameters :

<form method="post" action={"content/action"|ezurl} > +++ ...(product)/$product....
....
</form>

Any help will save my life.

Regards.

Laurent

Xavier Dutoit

Tuesday 06 November 2007 12:54:41 pm

Hi,

I'd love to save your life, but not sure I got what you're trying to do.

Could you elaborate on your goal (for the sake of your life ;) ?

X+

http://www.sydesy.com

laurent le cadet

Wednesday 07 November 2007 12:01:56 am

Xavier,

The form + var:

{def $product = $object.data_map.name.content|wash() }

<form method="post" action={"content/action"|ezurl} >
<input type="hidden" name="ContentLanguageCode" value="{ezini( 'RegionalSettings', 'Locale' , 'site.ini')}" />
<input type="hidden" name="ClassIdentifier" value="information" />
<input type="hidden" name="NodeID" value="{$object.main_node.parent.node_id}" />
<input type="image" class="btn-info-produit" src={"1x1.gif"|ezimage} name="NewButton" />
</form>

...which generate the regular url: http://217.147.200.104/fr/content/edit/6920/1

I would like to have this one: http://217.147.200.104/fr/content/edit/6920/1/(product)/The name of a product

If I'm right, "The name of a product" can be find in the ask edition template (let's say edit/information.tpl) as {$view_parameters.product}

I think I have to change the form's action (?) or maybe it's not the correct usage...

Laurent (still alive ;)

Xavier Dutoit

Wednesday 07 November 2007 5:52:09 am

ok, I nerver used the view parameter on edit, let us know if it works

otherwise action="{"content/action")|ezurl("no")}/(product)/xxx" should do it

X+

http://www.sydesy.com

laurent le cadet

Wednesday 07 November 2007 7:14:27 am

Xavier,

:(

I tryed it :

<form method="post" action="{"content/action")|ezurl("no")}/(product)/{$product}" >

which print this (source):

<form method="post" action="content/action/(product)/Test product" >

but just hit this address:

http://000.000.000.000/fr/content/edit/6963/1

But at it is say here (http://ez.no/doc/ez_publish/technical_manual/3_9/templates/basic_template_tasks), it should be possible.

Laurent

André R.

Wednesday 07 November 2007 12:59:59 pm

I haven't used myself, but you might be more successful in doing it more directly against content/edit like this:

{"content/edit/13/f/eng-GB/(color)/green/(amount)/34"|ezurl}

Where 13 is the contentobject_id

EDIT: this doesn't work when you create a new node of course, I only briefly looked at your question before posting :/
Might want to add a enhancement issue on this, because it doesn't seems like content/action supports view parameters.

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

laurent le cadet

Wednesday 07 November 2007 11:26:25 pm

André,

So it looks like there is noway to use $view_parameters while creating a NEW object.

Thanks.

Laurent

Ole Marius Smestad

Thursday 08 November 2007 2:26:12 am

Hi,

usage of user parameters in content/action is currently not supported. It will only work when used directly on content/edit.

--
Best regards,
Ole Marius


--
Ole Marius Smestad
Lead Engineer eZ Publish
Member of the Community Project Board

laurent le cadet

Thursday 08 November 2007 2:33:32 am

Thanks for precisions.

Regards.

Laurent

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 30 2025 00:44:36
Script start
Timing: Jan 30 2025 00:44:36
Module start 'layout'
Timing: Jan 30 2025 00:44:36
Module start 'content'
Timing: Jan 30 2025 00:44:37
Module end 'content'
Timing: Jan 30 2025 00:44:37
Script end

Main resources:

Total runtime0.7520 sec
Peak memory usage4,096.0000 KB
Database Queries79

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0045 588.1328151.2109
Module start 'layout' 0.00450.0029 739.343836.6484
Module start 'content' 0.00740.7439 775.9922638.4297
Module end 'content' 0.75120.0008 1,414.421919.8516
Script end 0.7520  1,434.2734 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.4269160.0002
Check MTime0.00130.1774160.0001
Mysql Total
Database connection0.00080.103610.0008
Mysqli_queries0.696092.5565790.0088
Looping result0.00050.0731770.0000
Template Total0.724196.320.3621
Template load0.00230.307620.0012
Template processing0.721895.978120.3609
Template load and register function0.00010.013810.0001
states
state_id_array0.00130.170510.0013
state_identifier_array0.00060.073320.0003
Override
Cache load0.00200.2703690.0000
Sytem overhead
Fetch class attribute can translate value0.00040.058540.0001
Fetch class attribute name0.00090.1133120.0001
XML
Image XML parsing0.00440.589340.0011
class_abstraction
Instantiating content class attribute0.00000.0036170.0000
General
dbfile0.00500.6704290.0002
String conversion0.00000.001540.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
8content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
9content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
14content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
3content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
2content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 38
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs