PHP File to Make Page-Specific CSS Styles

Professional Joomla social template with metro design and JomSocial extension support.
Rate this topic: Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.1.00 out of 6 based on 1 vote(s)
GK User
Fri Jan 24, 2014 3:55 pm
Reply with quote
Report this post
I'd like to insert the below code into the template file so that I can make page-specific css styles. Can you tell me which file to reference/edit? Thanks! -Lil

<!--head section-->
<?php
$active = JFactory::getApplication()->getMenu()->getActive();
?>
<!--head closed, beginning body -->
<body class="<?php echo $active->alias; ?> ">
User avatar
Senior Boarder

GK User
Fri Jan 24, 2014 7:20 pm
Reply with quote
Report this post
Hi,
1) Better do not touch template files - because you can break something and then you will said this is our fault. :whistle:
2) Be smart web developer and read this guide: http://www.gavick.com/documentation/joo ... ted-pages/
3) You can also use different suffix for different menu items. Then you can create new class for them. In template --> Features --> Suffixes for pages. Soon I will create guide also for this.
User avatar
Platinum Boarder


cron