Forum for discussing general topics related to Couch.
4 posts Page 1 of 1
I want to make different Styling of my menu navigation each Category, how to make this done?

Example: in Homepage, i use the default navigation with pattern background image, and in "football" Category i want to use grass image as Menu background.

Can i use Category Unique id for this?

Thanks in advance.
Can i use Category Unique id for this?
Sure. That would be the 'k_folder_id' variable. You may also use the category name (k_folder_name) for this purpose as this is also unique to the template.
Sure. That would be the 'k_folder_id' variable. You may also use the category name (k_folder_name) for this purpose as this is also unique to the template.

Thanks KK, but how to implement folders unique id on css? I little bit confuse
I tried something like this, but nothing work.

Code: Select all
#header #id-17{
background: url(../images/bg-nav3.png);
}

Thanks
If really necessary, we can actually convert a .css file into a bona-fide Couch managed template (there are a few threads discussing exactly this).

However, I think, you'd find it easier to define the CSS statements right within the regular frontend templates so that you can use Couch tags and variables in the styles e.g.
Code: Select all
<style>
    <cms:folders>
        #header #id-<cms:show k_folder_id />{
            background: url(../images/bg-nav3.png);
        }
    </cms:folders>
</style>

The snippet above is just by way of illustration. Your code will vary to suit your use-case.

Hope it helps
4 posts Page 1 of 1