Get the name of layout in node/view/full

Author Message

Jerome Despatis

Friday 09 July 2010 6:54:58 am

Hi,

I've done an override on a node/view/full, and in it, I'd like to get the name of the layout used.

For example, when I access my node with

 

/layout/set/dmvsimple/content/versionview/257/24/eng-GB

I'd like, in my override, to retrieve the 'dmvsimple'

In fact, thanks to show_variables(), dmvsimple is in Namespace: DesignKeys > used > layout

I've tried $DesignKeys:used.layout to get it, but it's always empty...

However $DesignKeys:used.layout works (it returns dmvsimple), when I invoke it from the pagelayout

=> Any idea how to get the layout name in a node/view/full override ?

Thanks for your help

Peter Keung

Friday 09 July 2010 7:11:03 am

If you're not directly in the full view template and are instead in an included or embedded template, you have to use the global namespace $#DesignKeys. If that's not the problem, you might be using an older version of eZ Publish that might have a bug in the eZ XML output handler.

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

Jerome Despatis

Friday 09 July 2010 7:16:18 am

Yes thanks !

So good syntax was {$#DesignKeys:used.layout}

Thanks again

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