Jump to content

Different backgrounds for categories?


Recommended Posts

example :
1. Use inline CSS

{if $category->id == 1}

Content-1

{elseif $category->id == 2}

Content-2

{/if}



2. Use Class or Id CSS

id == 1}"myclass-1"{elseif $category->id == 2}"myclass-2"{/if}>
Content



If you have a lot of Category Product, and you wanted to show different background in each category pages, you should use foreach to get all category id to compare with current category pages.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...