Forums / Setup & design / Detect used layout from node view

"Please Note:
  • At the specific request of Ibexa we are changing this projects name to "Exponential" or "Exponential (CMS)" effective as of August, 11th 2025.
  • This project is not associated with the original eZ Publish software or its original developer, eZ Systems or Ibexa".

Detect used layout from node view

Author Message

Marko Žmak

Saturday 28 February 2009 7:37:33 am

Is there a way to detect from node view template which layout is used?

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

Hubert Farnsworth

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