1. REGISTRATION REQUIREMENTS:

    Register with your xenforo.com Username then 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

Discussion in 'Showcase Closed Suggestions' started by Mathis Neumann, Nov 16, 2012.

  1. 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 :)
     
    BK201 likes this.
  2. Bob

    Bob Developer Staff Member

    ya, I can probably start adding in more complex stuff like that soon.
     
    Mathis Neumann likes this.
  3. Bob

    Bob Developer Staff Member

    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}">
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.