Share » Forums » Developer » creating a new variable

creating a new variable

creating a new variable

Wednesday 10 August 2005 6:59:27 am - 11 replies

Author Message

jb bianchi

Saturday 13 August 2005 3:14:43 am

hi,

I try to do this

$variable2=node.object.data_map.name

but no result.

Any ideas?

thank's.

K259

Tuesday 16 August 2005 6:14:46 am

$variable2={node.object.data_map.name}

jb bianchi

Tuesday 16 August 2005 6:53:35 am

I have already try it and no result.

Paul Borgermans

Tuesday 16 August 2005 8:22:17 am

Hi

Try

{if eq($node.object.data_map.name.content
, $variable)} 
1
{else}
2{/if}

hth

-paul

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

jb bianchi

Wednesday 17 August 2005 1:21:54 am

thank's but with it there is no result.
Nobody know how can I creat a new variable with {attribute_view_gui attribute=$node.object.data_map.name}?

I thank you for your answer.

ps: The problem with the last answer it that there is a \n at the end of $node..... and each time I see the value 2..

Ole Morten Halvorsen

Wednesday 17 August 2005 2:10:27 am

Hi,

Use the trim operator to remove \n.
See http://ez.no/doc/ez_publish/technical_manual/3_6/reference/template_operators/strings/trim

Ole M.

Senior Software Engineer - Vision with Technology

http://www.visionwt.com
http://www.omh.cc
http://www.twitter.com/omh

eZ Certified Developer
http://ez.no/certification/verify/358441
http://ez.no/certification/verify/272578

jb bianchi

Wednesday 17 August 2005 3:23:30 am

ok thank's. But I have ever try with it and there is the same result.

jb bianchi

Thursday 18 August 2005 7:43:25 am

Since yesterday I try to remove an <br /> to an varialbe.
I try the trim operator but no result.
DO you know what I have to do?
Thank's

jb bianchi

Friday 19 August 2005 7:08:38 am

hi,

there is a function which do the contrary of the function wash?

thank's.

Marko Žmak

Sunday 21 August 2005 5:45:31 am

Hi bianchi. For this new variable thing, why don't you try {set-block}? It goes something like this:

{set-block var=your_variable}
{attribute_view_gui attribute=$node.object.data_map.name}
{/set-block}

After that you can use $your_variable in the {if} statement. I'm not sure of the correct syntax, check the docs for that.

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

jb bianchi

Tuesday 23 August 2005 3:00:47 am

Hi,
thank's there isn't problem any more.
I have usee the set block and after I use function of Ez pUblish to do what I want.

Thank's a lot.

JB.

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu