Jump to content

Output a text generated with PHP to header.tpl


Recommended Posts

Hi,

I need to output a dynamic JS script between the <head> tags. I'd like to generate that script using PHP getting some data from the DB. I read the forum and I came to the conclusion that I need to create an override to the FrontController, in which I write the PHP logic and then I should assign a variable to Smarty in order to be able to refer that variable on the header.tpl file.

 

I'm stuck in creating an override to the FrontController that allows me to write some PHP and then assign the PHP generated data to a variable that I can use in a .tpl theme file.

 

I hope I've been clear!

 

Thanks in advance to anyone who helps me.

Robert

Edited by RobertNucci (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...