Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • bernmckin Friend
    #138256

    I really like the JA Labra theme. I would like to use the dark body theme on the homepage and the light theme on all other pages. Is there a way to do this?

    Thanks in advance for your help.

    For anyone who may be interested, I figured it out.

    (1) Before you begin, set your default template color to “light”

    (2) Make sure you have defined your Home page as a Frontpage layout (not article link), or this won’t work

    (3) Edit the template HTML and make the following changes:

    After these two lines:

    <!– Menu head –>
    <?php $jamenu->genMenuHead(); ?>

    Add these lines to test whether you are on the front page and to set the toolbody color accordingly:

    <?php
    if ($tmpTools->isFrontPage())
    $toolbody=”dark”;
    else
    $toolbody=$tmpTools->getParam(JA_TOOL_BODY);

    ?>

    Then, change the links that follow to this:

    <link href=”<?php echo $tmpTools->templateurl(); ?>/css/themes/<?php echo $toolbody; ?>.css” rel=”stylesheet” type=”text/css” />
    <link href=”<?php echo $tmpTools->templateurl(); ?>/css/colors/<?php echo $toolbody; ?>-<?php echo $tmpTools->getParam(JA_TOOL_COLOR); ?>.css” rel=”stylesheet” type=”text/css” />

    That’s it.

    cjmicro Friend
    #292179

    I’m not sure if there is a better way, but you can duplicate the template and give it a different name, then assign it to the pages you want light and dark, respectively.

    Cheryl

    bernmckin Friend
    #292195

    Thanks Cheryl. I was hoping to avoid duplicating the template. I would like to set the default to light, and then put in some code somewhere (that’s the tricky part), to switch to dark on the homepage. Do you know if this is possible?

    cjmicro Friend
    #292199

    Sorry, not a coder. 🙂 There have been some threads about using a different header for different pages, maybe that can help you in the right direction. I would be interested in the solution as I have a site I might want to try this on too. Good luck!
    Cheryl

    Phill Moderator
    #292202

    I’m not a coder either but it should be quite simple. I am just not too sure how joomla detects what menu item is selected. A simple if menu<whatever then theme=dark else=light type thing should be all that is required.

    I’m intrigued as to how to do it so I am currently searching for a theme that had that feature so I can see how it is done.

    bernmckin Friend
    #292802

    Hi Phil,
    I figured it out if you are still interested. I posted the answer in my original post. Thanks for responding.

    myeco Friend
    #303616

    hi pal,

    i am interested how you make it, can you give me some hints or guideline. Another issue. Is it possible embed this body-tool to other template, i like the expand mode very much, it make life easier. please give me a hand.

    Thanks in advance.

    By,
    Kevin.C

Viewing 7 posts - 1 through 7 (of 7 total)

This topic contains 7 replies, has 4 voices, and was last updated by  myeco 15 years, 5 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum