If this is your first visit, check our documentation. To post, register or login.
Forums / General Questions / css directory

css directory

Started by xerarchs on 19 Aug 2012, 10:41 PM · Views: 583

Results 1 to 6 of 6
19 Aug 2012, 10:41 PM
#1
xerarchs avatar

xerarchs

New Zenner

Join Date:
Apr 2008
Location:
Alamogordo NM
Posts:
32
Plugin Contributions:
0

css directory

Just a quick question, when creating a custom template, should the css directory be copied over to the custom location so there are two directories, one in the old location and one in the new, or should the directory be moved from the old to the new location.

Sorry for being new. Thanks Art

Next, copy the includes/templates/template_default/css directory and place the folder and its files in your new includes/templates/CUSTOM/ folder.

20 Aug 2012, 3:10 AM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Re: css directory

You will need stylesheets for your template. You will put them in a folder named "css" underneath your own custom template folder. If you wish to copy examples from template_default or from classic as a starting point, you are welcome to do that.

You will NEVER move any files out of the template_default folders/subfolders. You would only COPY files from there. And when it comes to PHP files, you only copy files that you are ALTERING.

In the case of "css" and "jscript" folders, if your template has that folder, the site will ONLY use those css and/or jscript folder contents when your template is active. It will NOT use the template_default versions of those folders if YOUR template has those folders present. But for the tpl_xxxxxxx.php files that exist in the other folders, the system will always look to YOUR template first and then to template_default.

That's probably way more than you wanted to know. Don't let it confuse you. Take it one step at a time. COPY what you need. Leave the rest alone. It's that simple.

.
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.

20 Aug 2012, 3:35 AM
#3
xerarchs avatar

xerarchs

New Zenner

Join Date:
Apr 2008
Location:
Alamogordo NM
Posts:
32
Plugin Contributions:
0

Re: css directory

Thanks DrByte, but that did confuse me. I will read it a couple dozen more times. The reason I ask is that none of the changes I have made in my custom folder propogated to the site, but when I make a change in the original css file, the changes appear. I am a fireifghter and have never done this stuff before.

20 Aug 2012, 3:49 AM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Re: css directory

At the risk of repeating the FAR MORE DETAILED information found in the FAQ articles on the topic, I offer this:

  1. Your template needs these basics:
    /includes/templates/YOUR_TEMPLATE_FOLDER_NAME/template_info.php
    Inside that file are a few things that identify your template. Set them to suit what you're doing.

/includes/templates/YOUR_TEMPLATE_FOLDER_NAME/css/stylesheet.css
Put your custom css stuff there

If you also want to customize things like template-specific images, add an images folder:
/includes/templates/YOUR_TEMPLATE_FOLDER_NAME/images ... and put your template-specific images in there.

If you are customizing something like maybe the header template, then you need:
/includes/templates/YOUR_TEMPLATE_FOLDER_NAME/common/tpl_header.php
Copy the original from template_default and make your changes and store them in this folder.

If you are going really zany by customizing specific pages, you'll need to put your specific alterations in this folder:
/includes/templates/YOUR_TEMPLATE_FOLDER_NAME/templates/
And in this case, you would find the file in template_default whose contents you want to change, and copy that file into this folder before editing.

  1. For your template to display on your storefront, you need to activate it in your Admin:
    Admin->Tools->Template Select.
    You should have only one template listed there.
    Edit the default template listed there, by choosing your template from the pulldown menu.
    If your template isn't in the pulldown list, then the template_info.php file isn't present as described above.

.
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.

26 Aug 2012, 3:40 PM
#5
xerarchs avatar

xerarchs

New Zenner

Join Date:
Apr 2008
Location:
Alamogordo NM
Posts:
32
Plugin Contributions:
0

Re: css directory

Hey DrByte, I was going over your instructions again and realized that I did not have a css folder in my custom template. all the css files were in there, just not in a css folder. that is now fixed and that part is working. Thanks much, Art

26 Aug 2012, 7:56 PM
#6
xerarchs avatar

xerarchs

New Zenner

Join Date:
Apr 2008
Location:
Alamogordo NM
Posts:
32
Plugin Contributions:
0

Re: css directory

If you are going really zany by customizing specific pages, you'll need to put your specific alterations in this folder:
/includes/templates/YOUR_TEMPLATE_FOLDER_NAME/templates/
And in this case, you would find the file in template_default whose contents you want to change, and copy that file into this folder before editing.

Also, if I change the name of 'page 2' to 'FAQ' would I save it in here?