MyBB Community Forums

Full Version: Template Question
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Where can we actually view the content that this is calling : {$footer} & {$header}

Where is the actual file that holds all that info. And how would we go about making , lets say {$footer2} ?
The are in the ACP templates & Styles / Templates / Header Templates / header_welcomeblock_guest and header_welcomeblock_member, and in Footer Templates / Footer.

To create a footer2 you can use the Add Template function, create the template, and then link to it where you want it displayed, like this {$footer2}. If you want it on all pages, I would place it at the top of the footer template. If only on the Home Page, then I'd place it just above {$footer} in the index template.

When you create a new template it is listed in the Ungrouped Templates area.
Yea i thought thats what i needed to do , but ive done all that , the footer2 template is now in ungrouped templates and ive placed {$footer2} just under {$footer} on the index , but its not displaying anything. Heres the bottom part of my index template:

<br style="clear: both" />
{$footer}
{$footer2}
</body>
</html>
Link to your site?
Im testing it on local server
That's OK, I tried it in my test forum and it didn't work for me either. I think it's going to take a core file code edit. Let me play around with it for a bit.

You could probably also use the page manager plugin though, and call the file where you want it displayed. I'll play around with that too and see what I come up with.

Edit: Forget page manager, you'd have to create an entirely new page to use that.
Thanks mark apreciate the help Smile
{$header} and {$footer} are defined in global.php:

eval("\$header = \"".$templates->get("header")."\";");
eval("\$footer = \"".$templates->get("footer")."\";");

So you'd need PHP to tell it what $footer2 is supposed to load. Putting $ and then a name of a template won't simply make it load that template, you have to tell it what the variable holds.
Oh right , thank you both
Yes that has worked perfectly Big Grin
Thanks Matt! I knew it had to be a core file edit since simply adding the template and calling it didn't work, but I was digging through forumdisplay.php looking for it, when you posted.