-
AuthorPosts
-
tripslip38 Friend
tripslip38
- Join date:
- March 2010
- Posts:
- 22
- Downloads:
- 0
- Uploads:
- 0
- Thanked:
- 2 times in 1 posts
April 29, 2010 at 9:28 pm #150750I’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
scotty
- Join date:
- March 2008
- Posts:
- 2339
- Downloads:
- 0
- Uploads:
- 13
- Thanks:
- 76
- Thanked:
- 827 times in 595 posts
April 29, 2010 at 9:50 pm #342109The 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
tripslip38
- Join date:
- March 2010
- Posts:
- 22
- Downloads:
- 0
- Uploads:
- 0
- Thanked:
- 2 times in 1 posts
April 29, 2010 at 10:09 pm #342114Hmmm. 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
tripslip38
- Join date:
- March 2010
- Posts:
- 22
- Downloads:
- 0
- Uploads:
- 0
- Thanked:
- 2 times in 1 posts
April 29, 2010 at 10:48 pm #342115I 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.
-
AuthorPosts
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