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.
|