Passing parameters to node_view_gui

Author Message

Marc Gibert Ginestà

Friday 28 November 2003 4:03:59 am

Hi!

Is it possible (or meaningful) to pass parameters to the template called by node_view_gui?

I mean, I have the following:

{node_view_gui view=line content_node=$Utils:item}

And inside the line template:

<a href={"/"|ezurl} class="white">{attribute_view_gui attribute=$node.data_map.title}</a>

What I would like is to change the value of the class attribute of the <a> tag depending on a parameter passed from the node_view_gui call. I'm aware I could have 2 line templates and simply change the 'view' parameter between the two, but would prefer the first solution.

Thanks in advance.

Marco Zinn

Friday 28 November 2003 6:09:36 am

I suggest, that you use "classification" for this.
See http://ez.no/developer/ez_publish_3/documentation/customization/components/datatypes/ezxmltext/classification
and
http://ez.no/developer/ez_publish_3/documentation/customization/custom_design/override_templates
Based on classification, you can create override template, but I think, that the "classification" text is also available to the template, so you could use one template and decide in this template, what do do.

Marco
http://www.hyperroad-design.com

Marc Gibert Ginestà

Friday 28 November 2003 7:40:34 am

OK!

I didn't know about classifications, so thank you, but I still don't get it.

The article about classifications seems to talk about class attributes on ez tags, not on the templates.

Could you please provide a clearer example?

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 19:15:36
Script start
Timing: Jan 18 2025 19:15:36
Module start 'layout'
Timing: Jan 18 2025 19:15:36
Module start 'content'
Timing: Jan 18 2025 19:15:37
Module end 'content'
Timing: Jan 18 2025 19:15:37
Script end

Main resources:

Total runtime0.7001 sec
Peak memory usage4,096.0000 KB
Database Queries57

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0054 587.9141152.6250
Module start 'layout' 0.00540.0029 740.539139.4609
Module start 'content' 0.00840.6901 780.0000531.2188
Module end 'content' 0.69850.0015 1,311.218812.1563
Script end 0.7000  1,323.3750 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00340.4862160.0002
Check MTime0.00140.1981160.0001
Mysql Total
Database connection0.00110.162710.0011
Mysqli_queries0.648092.5682570.0114
Looping result0.00050.0741550.0000
Template Total0.664694.920.3323
Template load0.00210.293820.0010
Template processing0.662594.639420.3313
Template load and register function0.00020.028710.0002
states
state_id_array0.00250.357410.0025
state_identifier_array0.00130.183920.0006
Override
Cache load0.00170.2367230.0001
Sytem overhead
Fetch class attribute can translate value0.00060.088720.0003
Fetch class attribute name0.00120.166040.0003
XML
Image XML parsing0.00070.094920.0003
class_abstraction
Instantiating content class attribute0.00000.001440.0000
General
dbfile0.00090.1244160.0001
String conversion0.00000.000940.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
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
3content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/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: 10
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs