Elfiszcze Posted June 9, 2015 Share Posted June 9, 2015 Hello. I need to add class to header for each category. In header.tpl of my template I have <header id="header"> I need to have something like this: <header id="header" class="category-id-3"> How can I achive that? Link to comment Share on other sites More sharing options...
Elfiszcze Posted June 9, 2015 Author Share Posted June 9, 2015 (edited) I figured it out. It shoud be: <header id="header" {if $smarty.get.id_category} class="category_{$smarty.get.id_category}"{/if}> code will look like this: <header id="header" class="category_3> Edited June 9, 2015 by Elfiszcze (see edit history) Link to comment Share on other sites More sharing options...
ventura Posted June 10, 2015 Share Posted June 10, 2015 it is not necessary add a smarty variable. Only with css .cat-3 #header Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now