Forums / Setup & design / How to detect node and OE attribute in embed template and custom tags

How to detect node and OE attribute in embed template and custom tags

Author Message

Marko Žmak

Friday 16 July 2010 10:08:17 am

When in template for embed object (embed.tpl), how can I detect in which node and which OE attribute is this object inserted? What variables are available?

The same question goes for custom tags.

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

Hubert Farnsworth

Peter Keung

Friday 16 July 2010 4:07:23 pm

For the node, try $#node

For other available variables, check out this extension:

http://projects.ez.no/show_variables

You might be able to use $#DesignKeys

http://www.mugo.ca
Mugo Web, eZ Partner in Vancouver, Canada

Marko Žmak

Sunday 18 July 2010 6:54:19 am

Yes the $#node works.

As for the attribute there's an $attribute variable in the ContentAttribute namespace, the show_variables extension did the work.

But I cannot find out how can I address this variable in ContentAttribute namespace, using {$attribute} doesn't work. Any ideas?

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

Hubert Farnsworth

Peter Keung

Sunday 18 July 2010 8:34:56 pm

Try $#ContentAttribute:attribute

Sounds like a possible candidate for an override rule.

http://www.mugo.ca
Mugo Web, eZ Partner in Vancouver, Canada