Knowledge Base

How to get current layout in theme.php?

THEME_LAYOUT
on Tuesday 30 November 1999
comments: 0
THEME_LAYOUT

possible values are defined in theme.xml

example of using in theme.php:

if(THEME_LAYOUT == 'contact'  )    {
  $googlemapsapikey = e107::pref('contactpage', 'googlemapsapikey');
  e107::js("url", "https://maps.google.com/maps/api/js?key={$googlemapsapikey}", 'jquery', 2);
  e107::js("theme", "js/gmap3.min.js", 'jquery', 2);
}