Results 1 to 9 of 9
  1. #1
    Join Date
    May 2009
    Posts
    1,219
    Plugin Contributions
    2

    Default category and sub-categories specific css

    Hi

    I am trying to specific background for a category and its sub-categories.
    I did create the c_[cat-id].css file - specifically c_66.css - and it works fine for the top category, but the sub categories do not inherit.

    I tried combinations like
    c_66_children.css
    c_66_70_children.css
    c_66_70_73.css

    None works.

    I tried
    c_66_70.css
    and it works for that specific sub-category

    I could go and create all the sub-categories of 66, the problem stays with the sub-sub-categories.

    Thank you
    v.1.51

  2. #2
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: category and sub-categories specific css

    Quote Originally Posted by keneso View Post
    Hi

    I am trying to specific background for a category and its sub-categories.
    I did create the c_[cat-id].css file - specifically c_66.css - and it works fine for the top category, but the sub categories do not inherit.

    I tried combinations like
    c_66_children.css
    c_66_70_children.css
    c_66_70_73.css

    None works.

    I tried
    c_66_70.css
    and it works for that specific sub-category

    I could go and create all the sub-categories of 66, the problem stays with the sub-sub-categories.

    Thank you
    v.1.51
    c_68_70_children.css ought to address all of the children of the sub-category found at c_68_70. Check your includes/templates/YOUR_TEMPLATE/common/html_header.php file but there should be a section that loads _children related categories.

    Otherwise be sure to clear your cache or try a different browser as there may be some stored history preventing seeing the changes made to the css...

    For others, the information related to the above filenames can be found in: includes/templates/template_default/css/CSS_read_me.txt
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  3. #3
    Join Date
    May 2009
    Posts
    1,219
    Plugin Contributions
    2

    Default Re: category and sub-categories specific css

    Thank you.

    Checked the includes/templates/MY_TEMPLATE/common/html_header.php and the snip is there.
    Cleared cache, reloaded browser, used another browser, yet the issue is there.

    I believe I tried all possible combinations
    c_66.css
    c_66_children.css
    c_66_70_children.css

    It only works for the top-category
    c_66.css
    or when I add specific sub-category
    c_66_70.css
    c_66_70_73.css

    Although there are quite few sub-categories, I could go and just add the same file with specific path, but loading all those files is not the best option; any other idea what the culprit could be?

    If it can help the site and path to the interested category is
    cadante dot com /index.php?main_page=index&cPath=66

  4. #4
    Join Date
    May 2009
    Posts
    1,219
    Plugin Contributions
    2

    Default Re: category and sub-categories specific css

    Update

    Curiously another category works fine
    c_1_children.css
    displays correctly for category 1 and its subcategories.

  5. #5
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: category and sub-categories specific css

    Well, I've tried every combination of filenames that were provided above as "not" working and strangely enough, none of those files are on the server. I can directly access the c_66.css file, but none of the others that presumably are still on the server.

    Accessing is as simple as entering the full path to the file and allows simple read/view access. For example I can access the c_1_children.css file having this content:
    Code:
    /**
     * funzone category page custom style
     */
    
    body {
      background: url("../images/cat_bg/mainenoteca.jpg") repeat scroll 0 0;
    }
    But there is no c_66_ related files found in the directory to have any of the above identified filenames. Just c_66.css.

    Little side note, all versions of the css filenames can be stored, the rules of the one that has the highest priority (last loaded) will override any similar rule loaded previously. So even if c_66_70.css and c_66_children.css were loaded with the same content I thought the children one loaded later (see sequence provided in above readme).
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  6. #6
    Join Date
    May 2009
    Posts
    1,219
    Plugin Contributions
    2

    Default Re: category and sub-categories specific css

    Thank you.

    I had removed the ones that did not work, anyhow right now these are the files on the server:
    includes/templates/MY_TEMPLATE/css/c_1_children.css
    includes/templates/MY_TEMPLATE/css/c_66_children.css
    includes/templates/MY_TEMPLATE/css/c_66.css
    includes/templates/MY_TEMPLATE/css/index_home.css
    includes/templates/MY_TEMPLATE/css/print_stylesheet.css
    includes/templates/MY_TEMPLATE/css/stylesheet.css
    includes/templates/MY_TEMPLATE/css/stylesheet_css_buttons.css
    includes/templates/MY_TEMPLATE/css/stylesheet_foundation.css
    includes/templates/MY_TEMPLATE/css/stylesheet_normalize.css

    These two are identical
    c_66_children.css
    c_66.css
    Code:
    body {
      background: url("../images/cat_bg/funzonemain.jpg") repeat scroll 0 0;
    }
    #mainWrapper {
      background-image: url("../images/cat_bg/funzonesfondo.jpg");
    }
    While c_1_children.css is as you posted.

  7. #7
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: category and sub-categories specific css

    I realize that you have obfuscated your template name in this thread, but I would suggest double/triple checking the files in the directory because I receive a 404 when attempting to access:
    Code:
    includes/templates/afz_zc_mulk_17/css/c_66_children.css
    Which supposedly is on the server...
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  8. #8
    Join Date
    May 2009
    Posts
    1,219
    Plugin Contributions
    2

    Default Re: category and sub-categories specific css

    It was showing on the server list of ftp client, I went to cpanel to double check, and it was not there, reloaded it from cpanel, and it works as expected.

    Thank you very much for finding (NOT) it ;).

    * The obfuscation was to be in line with the convention of YOUR_TEMPLATE, CUSTOM_TEMPLATE, MY_TEMPLATE
    Last edited by keneso; 20 Oct 2016 at 11:33 AM.

  9. #9
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: category and sub-categories specific css

    No problem, I understand the use of the convention from a general standpoint (usually used in the generic discussion sense, but can be helpful to use the actual so that all are on the same page. :) your understanding of what is in place of YOUR_TEMPLATE, might be different than what those assisting have identified as YOUR_TEMPLATE. :))

    Ftp programs can be like your Web browser. They need to be refreshed periodically to confirm/pull the latest fileset. Typically this is with pressing F5, but each program can be different and do different things, Shift-F5, ctrl-shift-F5, etc...

    Glad it's resolved though. :)
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

 

 

Similar Threads

  1. Replies: 1
    Last Post: 12 Mar 2011, 07:18 AM
  2. css and sub categories
    By niccol in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 15 Jul 2009, 02:50 PM
  3. Show sub-sub categories underneath sub-categories on the category page?
    By tomrice in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 18 Jun 2009, 03:05 AM
  4. CSS system and sub-categories...
    By Alex Clarke in forum Basic Configuration
    Replies: 3
    Last Post: 20 Mar 2009, 09:21 PM
  5. CSS sheet for category and all SUB categories?
    By kiddo in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 30 Jun 2007, 08:34 PM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR