Detect used layout from node view

Detect used layout from node view

Saturday 28 February 2009 7:37:33 am - 1 reply

Author Message

Marko Žmak

Sunday 10 January 2010 6:14:32 am

I fond the sollution to this one, its $DesignKeys:used.layout variable. Just a notice, this variable is not always set, so it should be used like in this example:

{if is_set($DesignKeys:used.layout)}
    {def $layout=$DesignKeys:used.layout}
{else}
    {def $layout=false()}
{/if}

It works both in pagelayout and in node view.

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

Hubert Farnsworth

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.