Page 2 of 2 FirstFirst 12
Results 11 to 17 of 17
  1. #11
    Join Date
    Nov 2005
    Location
    Colorado Springs, CO USA
    Posts
    7,033
    Plugin Contributions
    31

    Default Re: CSS to Control Header

    This is from the "what's new" document from v1.3.5 concerning stylesheets:
    CSS-per-page coding changes may affect your stylesheet naming conventions. The naming for category pages now properly uses cPath, like: c_3_10.css, c_31_52_88.css, etc.
    I'm guessing that it means you need to specify the complete $cpath for each category/subcategory combination.

    For your hardware page

    c_1.css would be for your top category.

    c_1_17.css would be the first subcategory in that top category.

    I'll play around with this a while and see if I can work out something.

    In the mean time maybe DrByte can come up with something.

  2. #12
    Join Date
    Aug 2005
    Location
    Trujillo Alto, Puerto Rico
    Posts
    1,550
    Plugin Contributions
    9

    Default Re: CSS to Control Header

    I'm guessing that it means you need to specify the complete $cpath for each category/subcategory combination.
    Yes, I've tried that before; but isn't that crazy? if you have 20 categories/subcategories that means 20 additional css + the main + IH + Printer + News + Tabbed +++++ you can end up with 30 css, that's not good from what I've heard.

    So we are going backwards here. >>sigh<<
    IDEAS Girl
    IDEAS Creative Group
    = Your image... our business!

  3. #13
    Join Date
    Nov 2005
    Location
    Colorado Springs, CO USA
    Posts
    7,033
    Plugin Contributions
    31

    Default Re: CSS to Control Header

    You're right, it does seem to be taking steps backward.

    But, these stylesheets are only picked up when a particular page needs them otherwise they don't show up like the main stylesheet(s)

    So you could technically have all those c_??_??.css files on your server but they'd only get called as needed.

    In any case, maybe DrByte can come up with something.

  4. #14
    Join Date
    Apr 2006
    Location
    West Salem, IL
    Posts
    2,888
    Plugin Contributions
    0

    Default Re: CSS to Control Header

    I don't see an easy answer to this one but some observations. The stock 1.3.5 install has #headerWrapper and #logoWrapper used in that area and the sophy blue template is made up of tables in the header area. Maybe classing the table in someway would help as currently the only class is "table.header".
    I know that this doesn't point to why it changes but it might point in the right direction to fix it.
    Mike
    AEIIA - Zen Cart Certified & PCI Compliant Hosting
    The Zen Cart Forum...Better than a monitor covered with post-it notes!

  5. #15
    Join Date
    Nov 2005
    Posts
    2
    Plugin Contributions
    0

    help question Re: CSS to Control Header - A Clue Please :)

    Has there been any answer to this query? I too am trying to create different headers for different categories. I have searched the forum and have found a quarter of an answer and need a little bit more of a clue. As I understand it, using:

    Code:
    c_??.css // changes to all info pages in a category
    I can create a stylesheet for each categories. Now is this c_categoryIDhere.css?What I don't understand, if someone could please clarify, is how do I get zencart to access this stylesheet?

    TIA
    ugh&#33;

  6. #16
    Join Date
    Nov 2005
    Location
    Colorado Springs, CO USA
    Posts
    7,033
    Plugin Contributions
    31

    Default Re: CSS to Control Header

    I can create a stylesheet for each categories. Now is this c_categoryIDhere.css?What I don't understand, if someone could please clarify, is how do I get zencart to access this stylesheet?
    Create your c_??.css and upload it to your server.

    Now whenever the page with that category number is called, Zen Cart will automatically access the stylesheet.

    This is the code in html_header.php that makes this possible.
    PHP Code:
    /**
     * load stylesheets on a per-page/per-language/per-product/per-manufacturer/per-category basis. Concept by Juxi Zoza.
     */
      
    $manufacturers_id = (isset($_GET['manufacturers_id'])) ? $_GET['manufacturers_id'] : '';
      
    $tmp_products_id = (isset($_GET['products_id'])) ? (int)$_GET['products_id'] : '';
      
    $tmp_pagename = ($this_is_home_page) ? 'index_home' $current_page_base;
      
    $sheets_array = array('/' $_SESSION['language'] . '_stylesheet'
                            
    '/' $tmp_pagename
                            
    '/' $_SESSION['language'] . '_' $tmp_pagename
                            
    '/c_' $cPath,
                            
    '/' $_SESSION['language'] . '_c_' $cPath,
                            
    '/m_' $manufacturers_id,
                            
    '/' $_SESSION['language'] . '_m_' . (int)$manufacturers_id
                            
    '/p_' $tmp_products_id,
                            
    '/' $_SESSION['language'] . '_p_' $tmp_products_id
                            
    );
      while(list (
    $key$value) = each($sheets_array)) {
        
    //echo "<!--looking for: $value-->\n";
        
    $perpagefile $template->get_template_dir('.css'DIR_WS_TEMPLATE$current_page_base'css') . $value '.css';
        if (
    file_exists($perpagefile)) echo '<link rel="stylesheet" type="text/css" href="' $perpagefile .'" />'."\n";
      }

    /** 

  7. #17
    Join Date
    Nov 2005
    Posts
    2
    Plugin Contributions
    0

    Default Re: CSS to Control Header

    Clyde!

    You are a doll (well, sorta) ;)! Will try this out asap. THANKS so much for the reply!
    ugh&#33;

 

 
Page 2 of 2 FirstFirst 12

Similar Threads

  1. v151 Link font size control in CSS
    By CabinetGuy in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 24 Apr 2014, 04:05 PM
  2. v151 Product Listing Control with CSS
    By cyberfolli in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 4 Sep 2013, 03:29 PM
  3. css control for ezpages? header graphics
    By atracksler in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 27 Sep 2009, 11:21 PM
  4. Admin Control Panel or CSS?
    By jaggers in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 16 Nov 2007, 06:33 AM
  5. want to reposition an image using css. what is css to control this?
    By what44 in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 10 Nov 2007, 05:03 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