test melih
 melih
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • tripslip38 Friend
    #150750

    I’m specifying a page class suffix to my Home (default) menu item, which is a Front Page layout on my heavily customized implementation of ja_lead. I’d like to be able to add some additional classes for the header on the homepage only.

    I’ve set my page class suffix for the Main menu > Home item to “.homepage”

    After a reload, I expected this: <body id=”” class=” fs3 homepage”>

    But it’s this instead: <body id=”bd” class=” fs3″>

    What gives? Am I doing this wrong, or is it a problem with the ja_lead template? I’ve done a little reading where other people needed front page solutions and used the tmpTools > isFrontpage() function, but I’m not looking for a front page-only solution either, as I’ll need the page class suffix to work for any page.

    Thanks.

    PS: I cannot post the site publicly, sorry for lack of demo.

    scotty Friend
    #342109

    The page class suffix only effects the component area (main content area) of the page. The <body> tag covers the whole page.

    Sometimes JA refer to the main content area as the ‘body’ in their demos and I think this confuses people.

    If you look further down your page source you will see the .homepage text applied to tags.

    tripslip38 Friend
    #342114

    Hmmm. I’d expect an appending css class to be applied to a top level element like <body> to give the user maximum flexibility in making per-page layout changes via CSS only.

    Nowhere in the HTML source is my classname found.

    Is there a tmpTools function that I can use to output the page class suffix wherever I want it? How can I find the documentation for this PHP class?

    Thanks.

    tripslip38 Friend
    #342115

    I think this will handle my needs:

    http://docs.joomla.org/Using_the_Page_Class_Suffix_in_Template_Code

    It’s not JA specific, so thanks for your time anyway.

    Edit: It worked wonderfully. I encourage people who want to enhance their JA templates to study the Joomla Docs Wiki.

    scotty Friend
    #342174

    Yes, of course, you can move the page class suffix to include the <body> tag with <?php echo $pageclass ? $pageclass : ‘default’; ?>

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

This topic contains 5 replies, has 2 voices, and was last updated by  scotty 14 years, 9 months ago.

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