PDA

View Full Version : Adding custom template to another template


Raw Sugar
06-12-2009, 04:39 AM
Okay, I'll be as descriptive as possible.

On my forum (http://www.obviouslyinsane.com/), I'd love to have an affiliates drop down box in the 'footer' in the middle of the style, links, copyright and all that. The only problem with having it hard-coded into the 'forumhome' template is that some styles have edited footer templates. Which means the drop down would have to be edited in each scheme.

I'm hoping there's a way to, either by php includes or some other way, I could have the drop down in its own template and call that over in the footer.

For the time being, I've settled with the affiliates having its own page, but it's very annoying and I'm sure no one goes to them.

So any and all help would be greatly appreciated! Thanks in advance...

Lynne
06-12-2009, 04:08 PM
Are you using a plugin to create the content of the dropdown? You could spit the results of that plugin into a variable:
eval('$myvariable = "' . fetch_template('mytemplate') . '";');
And then enter $myvariable into your various footer templates.

ragtek
06-12-2009, 04:10 PM
Also don't fortget to cache it!

https://vborg.vbsupport.ru/showthread.php?t=119933

Lynne
06-12-2009, 04:24 PM
^^ Yep! I always forget that until I look down at those bold red letters at the bottom of my page. :D

Raw Sugar
06-12-2009, 05:14 PM
Okay, thanks for responding guys! I can't try this out yet, but I will as soon as I get a chance (a couple days probably). I will let you know how it goes!

Raw Sugar
06-19-2009, 03:50 AM
Yes, it works! Thanks so much for directing me to that thread! :-)