embedding a toc template

embedding a toc template

Wednesday 24 February 2010 3:10:46 pm - 2 replies

Author Message

paul bolger

Saturday 27 February 2010 11:58:07 pm

Looks like I'm replying to my own question. The only way I've found to what I needed was to use a 'universal variable'

So

 {eztoc( $#node.object.data_map.description )}

works. Thanks to the chap with the Russian sounding name... (can't find the post again!) for the tip.

Also: I read that this isn't used much any more. If anyone has a better way of doing it I'd be interested to hear.

BTW: I ended up using a custom tag rather than an embedded object. A custom tag is slightly easier for the user, but an embedded object would allow you to insert a toc for a page other than the current one - which may be handy in some situations.

Paul Bolger

Nicolas Pastorino

Tuesday 02 March 2010 1:18:19 am

Hi Paul,

Although i would instinctively had gone for your second solution, i investigated a bit on the first issue you raised. It appears that in the embed templates, the only variable always present is $object, representing the embedded content object. Additionally, you may have a $object_parameters variable, containing various attributes (editable in the small popup appearing when embedding an object).

About the $#node notation, altough indeed not used often, it is fine, and i do use it often.

Cheers !

--
Nicolas Pastorino
Director Community - eZ
Member of the Community Project Board

eZ Publish Community on twitter: http://twitter.com/ezcommunity

t : http://twitter.com/jeanvoye
G+ : http://plus.tl/jeanvoye

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

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.