fundamental skins question

When I select a new skin from the Admin’s skin selector tool, what exactly happens behind-the-scenes with the site’s file? As best as I can tell, files are copied from /var/skins_repository/[skin_name] to /skins/[skin_name], along with core files from /var/skins_repository/base. Am I understanding this correctly?



Also, what is the best practice for modifying skins? If my initial understanding is correct, should I make a backup of the /var/skins_repository/base folder, edit the templates within the original folder, and then use the Admin’s skin selector to put those modifications into effect?



Any help would be much appreciated.

I would make a backup of the file in the skins folder and then make changes to the original file. This way you can easily test your changes and also easily get back to the previous state. Since you are running v2, you could also make your changes using the new “hooks” feature which will also leave your original skin untouched.



I would only make changes to the repository once I knew things were working as expected. Once you change the file in the repository this becomes the base for the “Restore from the repository” link in the template editor.



Bob

[quote name=‘Herbaria’]As best as I can tell, files are copied from /var/skins_repository/[skin_name] to /skins/[skin_name], along with core files from /var/skins_repository/base. Am I understanding this correctly?

[/QUOTE]

Yes, you are correct. The ‘base’ directory is loaded first (which is effectively the ‘basic’ skin). Then the skin-specific files are loaded for the customer and admin skins. “Skins” deal mostly with layout, not style. So when you find a layout that you like, use it for a base. Then use local stylesheets to modify things like colors, graphic backgrounds, etc. It’s really pretty well architected.


[QUOTE]

Also, what is the best practice for modifying skins? If my initial understanding is correct, should I make a backup of the /var/skins_repository/base folder, edit the templates within the original folder, and then use the Admin’s skin selector to put those modifications into effect?

Any help would be much appreciated.[/QUOTE]


  1. I would NEVER modify the repository. Once skins are installed there’s no need to.


  2. Wherever possible, avoid making changes to the standard templates (it keeps you out of upgrade hell). There are ‘hooks’ provided in most of the skin templates to allow the addons to work correctly and style themselves differently. You can do the same thing by either creating your own addon or installing the free one located here: [url]http://www.ez-ms.com/local_addon_v2.tgz[/url]. You can read this post for more information:[url]http://forum.cs-cart.com/showthread.php?t=11656[/url]



    tony

[quote name=‘jobosales’]I would make a backup of the file in the skins folder and then make changes to the original file. This way you can easily test your changes and also easily get back to the previous state. Since you are running v2, you could also make your changes using the new “hooks” feature which will also leave your original skin untouched.



I would only make changes to the repository once I knew things were working as expected. Once you change the file in the repository this becomes the base for the “Restore from the repository” link in the template editor.



Bob[/QUOTE]



Thanks for the help, Bob. Much appreciated!

[quote name=‘tbirnseth’]Yes, you are correct. The ‘base’ directory is loaded first (which is effectively the ‘basic’ skin). Then the skin-specific files are loaded for the customer and admin skins. “Skins” deal mostly with layout, not style. So when you find a layout that you like, use it for a base. Then use local stylesheets to modify things like colors, graphic backgrounds, etc. It’s really pretty well architected.






  1. I would NEVER modify the repository. Once skins are installed there’s no need to.


  2. Wherever possible, avoid making changes to the standard templates (it keeps you out of upgrade hell). There are ‘hooks’ provided in most of the skin templates to allow the addons to work correctly and style themselves differently. You can do the same thing by either creating your own addon or installing the free one located here: [url]http://www.ez-ms.com/local_addon_v2.tgz[/url]. You can read this post for more information:[url]http://forum.cs-cart.com/showthread.php?t=11656[/url]



    tony[/QUOTE]



    Tony, I’ve just begun to play with your local modification add-on, and I must say, I’m extremely impressed! It opens up a whole new world of customizability without worrying about breaking the original code. Great job, and thank you so much for sharing! I can’t tell you how many hours of effort and hair-pulling this is going to save me!