Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2007
    Posts
    2
    Plugin Contributions
    0

    help question Style category links based on hierarchy?

    Here's my situation, I am setting up a site to sell photographic images online. I am trying to organize my categories to Veiw By..

    My categories currently break down as such.

    Photographer (top level)
    Photographer Name 1 (second level)
    Photographer Name 2 (second level)
    Photographer Name 3 (second level)
    Gallery (top level)
    Abstracts (second level)
    Landscape (second level)
    Beaches (third level)
    Mountains (third level)
    Wildlife (second level)
    Birds (third level)
    Mammals (third level)
    Here's my problem. When ZenCart assigns the class names to the links it doesn't use names like level1, level2, etc. It uses category-top, category-sub and category-product. So, even though categories like Photographer Name and Landscape are at the same level (second level) in the hierarchy they have different class names. And I can't simply apply the same styles to both class names because categories like Beaches and Birds (third level) would also pick it up.

    What I'm trying to do (without success) is to add to the 2nd case statement (line 25) of the switch() function in tpl_categories.php to include an OR statement that says: if your parent category is the "top" category then set class name to "category-sub". I just can't seem to figure out the exact statement syntax.

    Any programmers out there that can offer a suggestion?
    Thank you,
    Mike D.

  2. #2
    Join Date
    Apr 2007
    Posts
    2
    Plugin Contributions
    0

    Default Re: Style category links based on hierarchy?

    Apologies for the bump, but I'm still in need of help with this. Are there any Zen masters out there that can offer advice on the matter?

    I'm still trying to fix the problem at the switch statement. I can't seem to figure out how the script is reading the returned sql query.

    Thank you,
    Mike D.
    Thank you,
    Mike D.

 

 

Similar Threads

  1. v139h Cannot style information sidebox links
    By barendfaber in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 11 Aug 2012, 05:43 PM
  2. Shipping Cost Based On Item Category With Discount Per Multiple Items In Category
    By CFen in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 22 Nov 2011, 07:05 PM
  3. Category CSS Style
    By dddmx3 in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 17 Jan 2011, 05:32 AM
  4. style for non ez-page links
    By jenstudio in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 13 Apr 2010, 04:35 AM
  5. Category Hierarchy List?
    By enigmabomb in forum General Questions
    Replies: 2
    Last Post: 29 Feb 2008, 09:51 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