Results 1 to 4 of 4

Hybrid View

  1. #1
    Join Date
    Sep 2009
    Posts
    5
    Plugin Contributions
    0

    Default Adding Category ID to body tag

    version 1.3.8

    I would like to be able to style each main category page differently. On other CMS packages I was able to do that through an id tag on each page.

    Is there a way for me to get a specific id such as $category_id or $category_name in the body tag to allow me to be more specific with my css?

    thanks

    Cherie

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

    Default Re: Adding Category ID to body tag

    Zen Cart allows you to use supplemental stylesheets on a per-page/per-category basis. Look at the CSS_readme.txt file in /includes/templates/template_default/css/ for a full list of options. For category id 23, add a file named c_23.css to your template's /css/ folder.

  3. #3
    Join Date
    Sep 2009
    Posts
    5
    Plugin Contributions
    0

    Default Re: Adding Category ID to body tag

    Thanks. I was just hoping to be able to include the change all on one page. But this works. Messy, but gets it done.

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

    Default Re: Adding Category ID to body tag

    If you want to keep the styling in one stylesheet, you could use Smart Backgrounds. It requires you to save an image with a relevant filename (can be a dummy 1x1px file) for each category you want to identify, but once you do that, you will have a custom classname for the body. Non-identified cats, pages, etc. get the base classname. You can identify by top cats or individual subcats as you like.

 

 

Similar Threads

  1. Need to add code below </head> tag and above <body> tag in product page
    By Danielle in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 11 Apr 2010, 07:53 PM
  2. </body> tag
    By jordangottlieb in forum General Questions
    Replies: 4
    Last Post: 6 Apr 2008, 11:04 PM
  3. Body Tag
    By Access in forum General Questions
    Replies: 2
    Last Post: 30 Jul 2007, 04:08 AM
  4. Adding distinct ID to index page body tag
    By swortis in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 5 Jul 2007, 09:48 PM

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