Results 1 to 6 of 6
  1. #1
    Join Date
    Jan 2006
    Posts
    115
    Plugin Contributions
    0

    Default css/english files loading rules

    Hi,

    Is there any links that explain the rules of how css/english files automaticaly load in custom folder?

    Thanks
    Eric

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: css/english files loading rules

    My explanation will most likely be superceeded or defined in a better maner...but -

    ZC first looks for the core file and finding this looks for any template specific file and if found uses it and if not the core file is used -

    Same schema for css files and additionally, and not due to Zen Cart, but the rules for css - all files that are available that have a .css extention are loaded and processed in order -

    Reason not to name an unwanted css file as old_stylesheet.css as this will also load.
    Zen-Venom Get Bitten

  3. #3
    Join Date
    Jan 2006
    Posts
    115
    Plugin Contributions
    0

    Default Re: css/english files loading rules

    Quote Originally Posted by kobra View Post
    My explanation will most likely be superceeded or defined in a better maner...but -

    ZC first looks for the core file and finding this looks for any template specific file and if found uses it and if not the core file is used -

    Same schema for css files and additionally, and not due to Zen Cart, but the rules for css - all files that are available that have a .css extention are loaded and processed in order -

    Reason not to name an unwanted css file as old_stylesheet.css as this will also load.
    Hi,
    Does that mean all the files under includes/my_template/css will be loaded automatically? If yes, the same class_name can't be used in differet css files ?
    Does language files under includes/languages/english/extra_definitions works the same way?

    Thanks
    Eric

    Thanks
    Eric

  4. #4
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: css/english files loading rules

    Does that mean all the files under includes/my_template/css will be loaded automatically? If yes, the same class_name can't be used in differet css files ?
    Yes to all loaded....Semi Yes to same class - the last loaded will override any before it


    Does language files under includes/languages/english/extra_definitions works the same way?
    This is a semi recent addition and a move towards the future. Making it easier to develop modules where any specific def's will be located and used from there but does not require that a base file be located with the core files
    Note there are other extra_definitions dir's in other areas also
    Zen-Venom Get Bitten

  5. #5
    Join Date
    Jan 2006
    Posts
    115
    Plugin Contributions
    0

    Default Re: css/english files loading rules

    Quote Originally Posted by kobra View Post
    Yes to all loaded....Semi Yes to same class - the last loaded will override any before it



    This is a semi recent addition and a move towards the future. Making it easier to develop modules where any specific def's will be located and used from there but does not require that a base file be located with the core files
    Note there are other extra_definitions dir's in other areas also
    This answered my question.

    Thanks again
    Eric

  6. #6
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: css/english files loading rules

    Quote Originally Posted by kobra View Post
    all files that are available that have a .css extention are loaded and processed in order -

    Reason not to name an unwanted css file as old_stylesheet.css as this will also load.
    I'll just add a small clarification here in terms of which files are loaded when:
    Zen Cart automatically includes all .css files that start with "style" ... ie: stylesheet.css, styles_mine.css, styles_that_are_extra.css, etc.
    It also loads .css files that match the name of the page being displayed, ie: checkout_payment.css (when main_page=checkout_payment), etc.
    It also loads other .css files based on some additional rules, which are documented in your Zen Cart files in the /docs/ folder and also in the wiki.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

 

 

Similar Threads

  1. Naming rules for downloadable files?
    By jgold723 in forum General Questions
    Replies: 3
    Last Post: 21 Nov 2011, 08:50 PM
  2. Admin CSS Rules
    By quick1 in forum General Questions
    Replies: 1
    Last Post: 21 Jun 2011, 06:37 PM
  3. CSS files are loading twice,normal and minimized,how to solve?
    By Rimo in forum Templates, Stylesheets, Page Layout
    Replies: 7
    Last Post: 27 Mar 2011, 11:55 PM
  4. Changing CSS rules for one page only.
    By CheekyCockney in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 14 Mar 2011, 12:53 AM
  5. Changing css rules of multiple pages
    By acummins in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 5 Feb 2010, 09:11 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