MyBB Community Forums

Full Version: Weird Template Problem.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,

In another topic, I mentioned how I wanted to omit a certain line of code. -Lex suggested to me that I make two templates, and use one for the site and one for the forum. What I did was, I made 2 custom templates: headertemplate and headersite. headertemplate contained the part of the template I wanted to include in both. The header template has the following code:

{$headertemplate}
<br/><navigation>
		<div id="content" style="vertical-align: top;"> 
			{$bannedwarning}
			{$bbclosedwarning}
			{$unreadreports}
<br/>

headersite is the template I included on my site, which has the same code as above, just without the second and last lines. Now, the site one works perfectly, but the original one does not. I have added all new templates to global.php. Even stranger, if I edited the index template, and told it to include headersite, it would work. I have no idea why the header template wouldn't include this template, as there's no valid reason. The rest of the header template works, but not the inclusion.

All help is appreciated. Thank you.
Sorry for the bump but this is very urgent. Sad
Well you did post it in the wrong section... Toungue
Erm, are you trying to include headertemplate inside headertemplate?
No, I'm including headertemplate in the header. Headersite, which contains the following:

{$headertemplate}
		<div id="content" style="vertical-align: top;"> 
			{$bannedwarning}
			{$bbclosedwarning}
			{$unreadreports}
Works perfectly. It just doesn't make any sense...

Edit: As if it wasn't crazy as it is, including header outside of MyBB works perfectly as well.
Bump: It's become apparent that my MyBB copy can't include template's in it's header. Why is this happening? -_-

Edit: -Lex just helped me solve it. Originally, he told me to add the headertemplate code below the header code in global.php. After putting the headertemplate above it, it worked, as it was defined beforehand. Thanks man. Smile