sent a variable in a href

Author Message

jb bianchi

Thursday 11 August 2005 9:04:38 am

hi,

I have a problem and I need help.
How can I sent a variable in a href like it

<a href={$:item.url_alias|ezurl}>{$:item.name|wash}</a>

I want to send a variable $v='a'. I use it for a test in the next page.

Thank's.

Paul Borgermans

Friday 12 August 2005 10:17:06 am

There are a few ways to implement this.

1) Use custom variables to pass between view templates

2) Create a GET query of which the variables can be read with the ezhttp template operator.

hth

-paul

eZ Publish, eZ Find, Solr expert consulting and training
http://twitter.com/paulborgermans

jb bianchi

Saturday 13 August 2005 3:05:23 am

ok,

but can I do this:

<a href={$:item.url_alias?$v='a'|ezurl}>{$:item.name|wash}</a>
and in the next page, I do v=ezhttp('v','get')
because I have already done it and each time if I write {$v} there is no value.

thank's

Gabriel R.

Saturday 13 August 2005 4:03:29 am

try it this way:

link including get variable:

<a href={concat($:item.url_alias,'?v=a')|ezurl}>{$:item.name|wash}</a>

result page:

{def $v=ezhttp('v','get'}
GET variable 'v': {$v}

gab

Gabriel Ambuehl

Saturday 13 August 2005 4:31:07 am

Or

concat(url_alias, '(name)/value')|ezurl

and retrieve the value from $view_parameters.name

Visit http://triligon.org

jb bianchi

Saturday 13 August 2005 7:15:13 am

ok thak's for your answer that help me so much.

but it is possible to do the same with this:

{attribute_view_gui attribute=$node.object.data.map_data.an_expert}
I want to send az variable too.

thank's

David Eriksson

Monday 15 August 2005 12:38:50 am

{attribute_view_gui attribute=$node.object.data.map_data.an_expert myvar=data}

Like that?

http://ez.no/doc/ez_publish/technical_manual/3_6/reference/template_functions/visualization/attribute_view_gui

/David

jb bianchi

Monday 15 August 2005 2:19:00 am

yes,

but I 'll try but there is no need to declare the variable in the next template?
thank's

David Eriksson

Monday 15 August 2005 3:53:47 am

Nope, just access it with $myvar.

/David

jb bianchi

Tuesday 16 August 2005 1:12:24 am

hi,

I'm sorry but I have done what you say to me and no result.
The variable in the next template have no value.
What I have forget to do?

thank's

David Eriksson

Tuesday 16 August 2005 1:55:01 am

I'm not quite sure how it works, it's rather mysterious. For example, this doesn't work:

{node_view_gui view=full content_node=$obj redirecttimer=$redirecttimer plasmaoffset=$module_result.view_parameters.plasmaoffset}

This, however, works:

{def $p_off=$module_result.view_parameters.plasmaoffset}
    {node_view_gui view=full content_node=$obj redirecttimer=$redirecttimer plasmaoffset=$p_off}

Perhaps that can help you.

/David

jb bianchi

Tuesday 16 August 2005 6:52:33 am

thank's I'll try.

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:31:10
Script start
Timing: Jan 18 2025 19:31:10
Module start 'layout'
Timing: Jan 18 2025 19:31:10
Module start 'content'
Timing: Jan 18 2025 19:31:11
Module end 'content'
Timing: Jan 18 2025 19:31:11
Script end

Main resources:

Total runtime1.1553 sec
Peak memory usage4,096.0000 KB
Database Queries90

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0067 589.0313152.6250
Module start 'layout' 0.00670.0031 741.656339.4453
Module start 'content' 0.00981.1440 781.1016736.6797
Module end 'content' 1.15370.0016 1,517.781320.1641
Script end 1.1553  1,537.9453 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.2774160.0002
Check MTime0.00140.1208160.0001
Mysql Total
Database connection0.00080.069710.0008
Mysqli_queries1.079793.4523900.0120
Looping result0.00110.0966880.0000
Template Total1.121497.120.5607
Template load0.00190.168520.0010
Template processing1.119496.890020.5597
Template load and register function0.00020.019110.0002
states
state_id_array0.00080.065410.0008
state_identifier_array0.00160.136220.0008
Override
Cache load0.00180.1520640.0000
Sytem overhead
Fetch class attribute can translate value0.00070.064450.0001
Fetch class attribute name0.00110.0954130.0001
XML
Image XML parsing0.00110.094150.0002
class_abstraction
Instantiating content class attribute0.00000.0016130.0000
General
dbfile0.00090.0749170.0001
String conversion0.00000.000740.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
12content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
22content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
5content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
6content/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: 48
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs