Home / Software / Sun Shop / How can I figure out which template does what in SunShop?
How can I figure out which template does what in SunShop?
Last updated: 07/03/2009
Here's a little function you can add to your "global.php
" file:
function tagtemplates() { global $templates; foreach ($templates as $t=>$val) { $templates[$t] = "n<!--TEMPLATE $t-->n".$val; } }
Just add this call after the "loadtemplates();" function call. This function is called in a few files, like index.php
, and checkout.php
.
What this does is add a line something like this:
<!--TEMPLATE header-->
to your HTML output, so when you "View Source", you can locate the spot you want to change, then look for the nearest "TEMPLATE" comment to figure out where it's being set.
NOTE: Do NOT leave the "tagtemplates" call in place on a live site! It will potentially break some screens, and will also tag your email messages that go out. Use only for Testing purposes to get things looking as you want.