PDA

View Full Version : How To Split HTML For Header+Footer Tempaltes


Wordplay
03-14-2011, 02:34 PM
ok so i'm designing a template from scratch because i can't get used to this new vbulletin style and have a few questions.


QUESTION 1: the order is

header
headinclude
headinclude_bottom
forumhome/forumdisplay/showtrhead/whatever
footer

right? what actually defines this?
(is there a container template or such that calls for all this?)


QUESTION 2: so now if i want to create a completely new style how would i split up my 3 tables, for example lets say my code is:


<table id="MyOwnFixedContainer" width="1088" align="center" border="0">
<tr>
<td id="header">&nbsp;</td>
</tr>
<tr>
<td id="forumbit or whatever">&nbsp;</td>
</tr>
<tr>
<td id="footer">&nbsp;</td>
</tr>
</table>


would this be split into:

HEADER TEMPLATE

<table width="1088" border="0" cellspacing="0" cellpadding="0">
<tr>
<td id="header">&nbsp;</td>
</tr>
<tr><td id="forumbit or whatever">




FOOTER TEMPLATE

</td>
</tr>
<tr>
<td id="footer">&nbsp;</td>
</tr>
</table>



and well whatever i want to actually be between header and footer would just be in showthread/forumdisplay/memberinfo or whatever.

would this work?

Lynne
03-14-2011, 04:40 PM
That should work assuming all the stuff in the middle is formatted correctly.

Your order is a bit off. If you look at a template like FORUMHOME or FORUMDISPLAY, you can see the whole <head> tag is in there which includes a call to the template headinclude at the top and headinclude_bottom at the bottom. Then you see the <body> tag which starts right out calling the header and navbar template. The footer is then at the very bottom.

Wordplay
03-14-2011, 05:14 PM
hello lynne, thanks a lot for replying!

so forumhome, showthread, usercp etc are actually the "container like" templates that call the header etc and place them?

interesting, i hadn't gotten to forumdisplay etc yet. but that makes excellent sense. thanks a lot that was very helpful!

i do have one final question, every vbulletin page calls the header, navbar, headinclude, headinclude_bottom and footer right? so if i take everything out of the headinclude and navbar and just place it all in the header, it'll still work practically teh same right?

Lynne
03-14-2011, 06:05 PM
i do have one final question, every vbulletin page calls the header, navbar, headinclude, headinclude_bottom and footer right? so if i take everything out of the headinclude and navbar and just place it all in the header, it'll still work practically teh same right?
Yes and No.

You cannot just move everything into the header template because every templates needs to have the variables registered for use in it. So, if you move a variable $my_headinclude_variable into the header template and it's not registered for use, then you will get nothing.

Wordplay
03-14-2011, 06:40 PM
got it, thanks again! enjoy your day.