Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • braca86 Friend
    #178205

    I got this code:

    <?php
    $active = JFactory::getApplication()->getMenu()->getActive();
    ?>

    <body class=”<?php echo $active->alias; ?> “>

    I just cant find head file to implement it in order to work… Can someone help???

    Ninja Lead Moderator
    #457974

    I’m confused your request, please explain what do you need?

    Winchester Friend
    #458727

    <em>@braca86 325650 wrote:</em><blockquote>I got this code:

    <?php
    $active = JFactory::getApplication()->getMenu()->getActive();
    ?>

    <body class=”<?php echo $active->alias; ?> “>

    I just cant find head file to implement it in order to work… Can someone help???</blockquote>

    You want to be able to have a different style for each page?

    You can create a theme for each style and them assign them to the menu items on the JA T3 configuration page (on the left).

    If you can’t bother to create a theme for each, you can use just one theme and then set a different class for each menu item (done in the menu items configurations under Page Display Options > Page Class). This will append whatever you place there to the body class in the body tag.

    Example:
    <body class=”bodyaboutus”>

    This way you can use .bodyaboutus as the selector class for that page.

    /* About Us Page Style */
    .bodyaboutus {background-color:#222222;}
    .bodyaboutus a {color:#ff0000;}
    .bodyaboutus a:hover {color:#ff00ff;}

    Best regards,
    H. Winchester Lyon

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

This topic contains 3 replies, has 3 voices, and was last updated by  Winchester 11 years, 11 months ago.

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