Forums / General / unknown syntax $#...using variables

unknown syntax $#...using variables

Author Message

Ludovico muratori

Saturday 08 December 2007 6:08:46 am

I'm overriding some templates, based on those ones in ezwebin (v 3.10). I found this chunk of code (imege.tpl for a a line view):

<div class="attribute-image"{if is_set($#image_style)} style="{$#image_style}"{/if}>
<p>{attribute_view_gui attribute=$node.data_map.image image_class=gallerythumbnail
href=$node.url_alias|ezurl}</p>
</div>

Is there anyone who can explain how does it work $#[var] syntax (as it is in if is_set($#...) above? Is there a part of the on line documentation or inside the ez books (I own them) where such a syntax is explained? I'm not really able to find it.

Sorry for any possible annoyance.

Ludvic

André R.

Saturday 08 December 2007 6:40:44 am

The word you are looking for is scope, and you can read more about it here:
http://ez.no/doc/ez_publish/technical_manual/3_10/reference/template_functions/variables/set

$# is for reading variables in the global scope

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