Guest bluecure Posted December 1, 2009 Share Posted December 1, 2009 Hi, Firstly I realize this topic has been brought up before http://forums.cubecart.com/index.php?showtopic=33226 , I just wasn't sure if I should resurrect an old thread or start a new on. Anywho, If anyone can help me with this issue I'd greatly appreciate it. I need to add some php code into the main index tpl file for the site. To attempt this I have referred to the variable I need in the tpl file like so {variablename} and then placed my php code in the includes/global/index.inc.php file. To be honest I have no idea if this is the write file to put my code in or not. I've tested the php code I'm using outside of cube cart and it works perfectly fine, but I can't get the php variable to be placed in the tpl file where {variablename} is. The php code is <?php $variablename = end(explode('/', $_SERVER['PHP_SELF'])); if($variablename == 'digital-test2.php') { $variablename = '<li class="active">'; } else { $variablename = '<li>'; } ?> I've tried following the messages in the topic linked to above but without success, Any guidance would be great, Thanks Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.