Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2011
    Posts
    14
    Plugin Contributions
    0

    Default Custom body id and class

    Hey all, found this old thread covering the subject of defining a different body id/class on different pages.

    This is a very useful feature, and the thread seemed to provide no solid, simple solution. At present my body tag looks like this:

    PHP Code:
    <body id="<?php echo $body_id ''?>" class="">
    Although this changes on static pages (like <body id="aboutus" class=""> for example), once I'm inside the shop all the body id's are the same (<body id="shopindex" class="">).

    Ideally I'd like the body id to be something like "shop" and the class to be the category, like this:

    HTML Code:
    <body id="shop" class="hampers">
    It wouldn't have to be the name of the category, the ID number would do. Any suggestions? Thanks in advance!

  2. #2
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Custom body id and class

    The latest version of Smart Backgrounds can assign a body class tag reflecting the current top category or subcategory id (not name). This should be applicable to styling any page element you want.

 

 

Similar Threads

  1. v139h Best way to use custom class between catalogue and admin
    By venablc in forum Contribution-Writing Guidelines
    Replies: 1
    Last Post: 27 Oct 2013, 03:42 PM
  2. Replies: 8
    Last Post: 28 Feb 2012, 03:05 PM
  3. Adding Custom Javascript to head and body
    By Xena in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 19 Jun 2007, 04:30 AM
  4. Static body for resizing (How to keep the body from sliding and moving when resizing)
    By bjmhistory in forum Templates, Stylesheets, Page Layout
    Replies: 22
    Last Post: 26 Jan 2007, 12:28 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg