Jump to content

Use PHP commands inside skin templates


Guest OvErDoSe

Recommended Posts

Guest OvErDoSe

Hello,

Stil working on my skin, now I also want to add flash title bars to the main content boxes. Same like the menu boxes...

I want to do this with includes or variable echo's, but when for example I add this:

<? php echo $titlebegin; ?>{HOME_TITLE}<? php echo $titleend; ?>

nothing happens. I declared the variables in the main index.php file, so things must work. I also tried to declare the variables in the template file (in this example "index.tpl") but that also didn't work.

I think it has something to do with the cubecart skin engine. Does someone have the sollution to use php commands inside the skin templates?

http://www.ntt-media.nl/dev/shop/

Link to comment
Share on other sites

Guest OvErDoSe

I read the topic you told me, but I still can't get it to work.

is it possible to assign a {VARIABLE} in global.inc.php and then use {VARIABLE} in all of the template files? because that is what I want...

Link to comment
Share on other sites

You can, but you still need to use assign function to send it to the templates. The template won't use a global variable automatically.

To display the variable in all of the templates you'll need to do the following.

1) create

$my_var_name = "Goober :)";
 in global.inc.php

2) use 	
$templ_name->assign("VARIABLE",$my_var_name);

in all xxxx.inc.php that use templates.

3) update all templates to display {VARIABLE} where you want.

This will take you a while ;), good luck

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