-
AuthorPosts
-
bernmckin Friend
bernmckin
- Join date:
- April 2008
- Posts:
- 4
- Downloads:
- 0
- Uploads:
- 0
- Thanks:
- 2
- Thanked:
- 2 times in 1 posts
February 17, 2009 at 5:56 pm #138256I 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 Friendcjmicro
- Join date:
- June 2008
- Posts:
- 501
- Downloads:
- 3
- Uploads:
- 0
- Thanks:
- 198
- Thanked:
- 81 times in 10 posts
bernmckin Friendbernmckin
- Join date:
- April 2008
- Posts:
- 4
- Downloads:
- 0
- Uploads:
- 0
- Thanks:
- 2
- Thanked:
- 2 times in 1 posts
February 17, 2009 at 8:36 pm #292195Thanks 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 Friendcjmicro
- Join date:
- June 2008
- Posts:
- 501
- Downloads:
- 3
- Uploads:
- 0
- Thanks:
- 198
- Thanked:
- 81 times in 10 posts
February 17, 2009 at 8:41 pm #292199Sorry, 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!
CherylPhill ModeratorPhill
- Join date:
- February 2014
- Posts:
- 7013
- Downloads:
- 40
- Uploads:
- 77
- Thanks:
- 917
- Thanked:
- 2206 times in 1818 posts
February 17, 2009 at 8:45 pm #292202I’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 Friendbernmckin
- Join date:
- April 2008
- Posts:
- 4
- Downloads:
- 0
- Uploads:
- 0
- Thanks:
- 2
- Thanked:
- 2 times in 1 posts
myeco Friendmyeco
- Join date:
- April 2009
- Posts:
- 35
- Downloads:
- 0
- Uploads:
- 3
- Thanks:
- 9
- Thanked:
- 1 times in 1 posts
May 5, 2009 at 9:59 am #303616hi 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 -
AuthorPosts
This topic contains 7 replies, has 4 voices, and was last updated by myeco 15 years, 6 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum