Page 2 of 2 FirstFirst 12
Results 11 to 12 of 12
  1. #11
    Join Date
    May 2008
    Posts
    402
    Plugin Contributions
    0

    Default Re: How to load css or js files for only one page?

    Isn't an easier way just to put any style requirements in <style> </style>? I just did that and it seems to work well...

  2. #12
    Join Date
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    2,586
    Plugin Contributions
    30

    Default Re: How to load css or js files for only one page?

    Isn't an easier way just to put any style requirements in <style> </style>? I just did that and it seems to work well...
    Easy, but invalid HTML. the CSS style tag should only be in the <head> element. Otherwise you need to use inline style rules.

    If I need some jscript in one product page only, I put the jscript in the product description.

    If I need some css in one product page, you can use the ZC inbuilt solution of creating a p_1234.css file where 1234 is the product id.

    If I need css/jscript in a group of similar products, and I don't want to create a load of .css files for every pid, I use boilerplate text

    http://www.thatsoftwareguy.com/blog/...-descriptions/

    so it is easy to put a jscript in the description that gets the css and/or jscript external files and dynamically inserts it in the head element as per this solution:
    http://www.javascriptkit.com/javatut...criptcss.shtml
    Steve
    github.com/torvista: Spanish Language Pack, Google reCaptcha, Structured Data, Multiple Copy-Move-Delete, Image Checker, BackupMySQL Admin/Auto...

 

 
Page 2 of 2 FirstFirst 12

Similar Threads

  1. how to change css for one ez-page?
    By blrw in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 9 Mar 2012, 12:10 PM
  2. How do I create a css stylesheet for only my shopping cart page.
    By bigstore in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 21 Feb 2012, 04:26 PM
  3. 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
  4. CSS Stylesheet for One Product Only?
    By limelites in forum General Questions
    Replies: 4
    Last Post: 19 Jun 2010, 04:46 PM
  5. Css specific for just one page
    By s_p_ike in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 16 Nov 2006, 03:32 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