Forums / Templates, Stylesheets, Page Layout / A dumb thing to do.....

A dumb thing to do.....

Locked

Views: 1,148

Results 1 to 3 of 3
This thread is locked. New replies are disabled.
5 Jul 2007, 11:14 AM
#1
digger149 avatar

digger149

New Zenner

Join Date:
Jun 2007
Posts:
10
Plugin Contributions:
0

A dumb thing to do.....

This one took me a few days to work out, so I thought I would share it with you. I had created a copy stylesheet in the custom directory, just as the template system demands..

/includes/templates/custom/css/stylesheet.css

I wanted to do some serious work on it, so I took a backup copy before changing it, I just copied the file to:

/includes/templates/custom/css/stylesheet1.css

Thereafter, changes I made in stylesheet.css worked erratically or not at all. Why ?

The template system pulls in ALL .css files from the /custom/css/ directory, including stylesheet1.css, so any changes I made in the original stylesheet.css were being overridden by the inclusion of definitions from stylesheet1.css

If you are going to take a copy, put it somewhere else !

Just thought I might save somebody the same pain as me....

5 Jul 2007, 11:59 AM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: A dumb thing to do.....

That is a case of the autoloading directory ...

There are several directories like that and the files are loaded automatically ... this is handy except in a case where you create a file like the one you made ... then you run into surprises ... :blink:

Thanks for posting the information, it is always a help to others ... :smile:

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

5 Jul 2007, 1:23 PM
#3
afo avatar

afo

Totally Zenned

Join Date:
Aug 2004
Location:
New York City
Posts:
6,800
Plugin Contributions:
0

Re: A dumb thing to do.....

It's not the template system. That's the way stylesheets work. css stands for Cascading Style Sheets. Multiple stylesheets can be in effect at the same time to do different things. When they overlap (for example, each stylesheet has a font definition), the last one loaded will be the one used.

There's no need to keep a backup copy of the original file since you can always reload it from the Zen Cart folder you copied it from. If you want to keep a backup copy of your custom stylesheet, don't give it a css extension or name it something like stylesheet.css.old. It won't be recognized as a stylesheet and won't be loaded.

Mary Ellen
I came; I saw; I Zenned
Taking over the world... one website at a time
Make sure brain is engaged before putting mouth in gear... or fingers to keyboard.

Holzheimer
Fan Odyssey