Jump to content

Ability to use the {VAL_SKIN} in all your tpl


Guest aikdo

Recommended Posts

I dont know if your all aware but when skinning you can only use the {VAL_SKIN} veriable in global/index.tpl , global/cart.tpl & Boxes/shopping_Cart.tpl ...

This causes problems if you want to add a image to your skin in say the boxes/catagories.tpl file as it will simply not work...

This Topic Describes how to add the {VAL_SKIN} variable functionality to all your boxes templates and content templates with ease...

first...

BOXES

In each file in [ Includes/boxes/** ]

FIND

$box_content=new XTemplate("skins/".$config['skinDir']."/styleTemplates/boxes/shoppingCart.tpl");




AFTER ADD 
$box_content->assign("VAL_SKIN",$config['skinDir']);

CONTENT PAGES - Slightly more difficalt, and not as needed...

In Each File in [ Includes/content/** ]

FIND LINE LIKE

$view_cat = new XTemplate ("skins/".$config['skinDir']."/styleTemplates/content/viewCat.tpl");
The bit in bold will be diffrent for each page...

AFTER ADD

$page_variable->assign("VAL_SKIN",$config['skinDir']);
Change the bit in bold to match the same as the first one... so as an exanple the view_cats page has the $view_cat bit so the code you need to enter is
$view_cat->assign("VAL_SKIN",$config['skinDir']);

Its that simple...

Can someone possibly pin this as i know it will be usefull to many, and hopefully brooky will include it in future versions... Just to make skining the stores easier...

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...