template variables, main.tpl.htm

Discussion in 'General' started by weezul, Dec 29, 2009.

  1. weezul

    weezul New Member

    hello,

    i try to give my ispconfig installation a new look but don't want to change anything else outside the template folder, i did a change in nav.php to get an additional template var for the menue but i am not very happy about that.

    every menu item has its own color and i want each module to have its own backgroundcolor too, is there a template var which provides information about the current active module so i can add some div's and css like #contentmail,#contenttools, #contentuser?


    greetz
     
  2. till

    till Super Moderator

    The variable is named "active". Take a look at the topnav.tpl.htm file in the themes/default/templates/ for an example.
     
  3. weezul

    weezul New Member

    hello and a happy new year!

    i tried using <tmpl_var name="module"> and <tmpl_var name="active"> in main.tpl.htm but they only seem to work in the topnav template file.
     
  4. till

    till Super Moderator

    Thats correct, they are only available within the nav_top loop and you have to use them within in the nav_top loop of the topnav file and not in the main.tpl.htm file.
     
  5. weezul

    weezul New Member

    is there a way to make em available in the main.tpl file?

    i would like an own color for each module, not only for the menu but also for the whole content, asigning colors to the nav bar worked but somehow i have to check which module is active.

    if something like that would be possible:
    PHP:
    <div id="<tmpl_var name='module'>_pageContent"
    it would be awesome.
     
  6. till

    till Super Moderator

    The module name is available in the variable "app_module".
     

Share This Page