• REGISTRATION REQUIREMENTS:

    Your username here MUST MATCH your XenForo username (connected to your XF license).

    Once you have registered here, then you need to start a conversation at xenforo.com w/Bob and provide the following:
    1. Your XenForo License Validation Token
    2. The Domain Name associated with the License
    NOTE: Your account will be validated once ALL requirements are verified/met. Thank you for your patience.

Specific css class for each category

M

Mathis Neumann

Guest
Hi there,
it's a very small idea, but you could add a css class for each category to enable special css designs for special categories.

It could look like this: (from a single showcase item)
HTML:
<div id="item-1" class="showcaseItem showcaseCategory-ExampleCategory" data-author="Maddis1337">

By adding that I could use css code like:

Code:
.showcaseCategory-ExampleCategory.showcaseItemTabs {
background: url(an Image);
}

(Maybe even on the main page)


Thanks :)
 
Upvote 1
I added this to the item template:
HTML:
<div id="item-{$item.item_id}" class="showcaseItem showcaseCategory-{$item.category_id}" data-author="{$item.username}">

btw, it uses the Category ID (not the category name) ie... showcaseCategory-10

Same class is also added to all the item listings (for each item) (Index, Category, Member etc)

Grid:
HTML:
<div class="showcaseItemContainer showcaseCategory-{$item.category_id} {$item.item_state} {xen:if $item.featured, featured}" id="item-{$item.item_id}">

List:
HTML:
<li class="showcaseListItem showcaseCategory-{$item.category_id} {$item.item_state} {xen:if $item.featured, featured}" id="item-{$item.item_id}">
 
Back
Top