Change CSS background image depending on Article/Menu ID

Premium, Furniture Joomla Design Shop Template with K2Store support
GK User
Tue Mar 13, 2012 6:54 pm
Hi:

I need change the template background acording Menu ID selected.
I´ve used tutorials about it, but that say than insert PHP code in file index.php in the <body tag but the index.php file of template black & white don´t have this tag. More over, wich CSS file Can I edit?

Please, where I can or What can I do? for any solution?

Of before hand, very thanks.

JOSE
User avatar
Fresh Boarder

GK User
Tue Mar 13, 2012 7:35 pm
If you are using latest version you don't have to edit index.php. Please follow below;

1. Find menu item id.
Go to Menus > Your Menu Name > Menu item Name , look at the end of line and see its menu item id. Lets say for this example it is 230
2. Assign suffix to menu item id
Go to joomla admin > Extensions > Template Manager > GK Black & White Default > Features > Suffixes for pages. Enter similar to below.
ItemID/Option: 230
Suffix: mysuffix
You can use any name instead of "mysuffix".
3. Enable css override option
Go to joomla admin > Extensions > Template Manager > GK Black & White Default > Advanced Features > Css Override = "on".
4. Adding css for our suffix
Edit File: templates/gk_templatename/css/override.css
Add as below. Replace .mysuffix with your suffix name
Code: Select all
.mysuffix {background: #000 ; }

or if you are using image then it will be
Code: Select all
.mysuffix {background: url("../images/backgrounds/mybackground.png") no-repeat ; }

See you around...
User avatar
Platinum Boarder


cron