PDA

View Full Version : [Help] Cannot put $navbar in header / put navigation on header


alon1853
12-07-2010, 04:12 PM
im so sorry for asking this stupid question , but i cannot do nothing expect putting all the header in navbar and fix it..
can it be on header?
its like vbulletin.org
see the Header - Home Forum bla bla bla
this is mean:
Go Back vBulletin.org Forum / vBulletin 3 Discussion / vB3 Programming Discussions
Reload this Page
[Help] Cannot put $navbar in header / put navigation on header
im so sorry but please help
i dont know what to do.
---------------for all who didn't understand-------------------
i want to do this:
<-- Header: Start -->
<-- Logo -->
Code: bla bla bla
<-- Logo END -->
$navbar
<-- Header: End -->
and its not working

EDIT:
in navigation i mean to this code:

<table cellpadding="4" cellspacing="1" border="0" width="100%" align="center">

<tr>
<td width="100%">
<if condition="is_array($navbits)">
<table cellpadding="0" cellspacing="0" border="0">
<tr valign="bottom">
<td><a href="#" onclick="history.back(1); return false;"><img src="$stylevar[imgdir_misc]/navbits_start.gif" alt="$vbphrase[go_back]" border="0" /></a></td>
<td>&nbsp;</td>
<td width="100%"><span class="navbar"><a href="$vboptions[forumhome].php$session[sessionurl_q]" accesskey="1">$vboptions[bbtitle]</a></span> $navbits[breadcrumb]</td>
</tr>
<tr>
<td class="navbar" style="font-size:10pt; padding-top:1px" colspan="3"><if condition="$_SERVER['REQUEST_METHOD'] == 'POST'"><img class="inlineimg" src="$stylevar[imgdir_misc]/navbits_finallink_$stylevar[textdirection].gif" alt="" border="0" /><else /><a href="$navbar_reloadurl"><img class="inlineimg" src="$stylevar[imgdir_misc]/navbits_finallink_$stylevar[textdirection].gif" alt="$vbphrase[reload_this_page]" border="0" /></a></if> <strong>$navbits[lastelement]</strong></td>
</tr>
</table>
<else />
<div class="navbar" style="font-size:10pt"><a href="$vboptions[forumhome].php$session[sessionurl_q]" accesskey="1"><img class="inlineimg" src="$stylevar[imgdir_misc]/navbits_start.gif" alt="" border="0" /></a> <strong>$vboptions[bbtitle]</strong></div>
</if>
</td>
</tr>
</table>
<!-- / breadcrumb, login, pm info -->

Lynne
12-08-2010, 01:23 AM
You can't just move the code and have it work in other templates. The navbits are defined after the header is rendered, so you need to do something to make the navbits code before the header is rendered if you want to move it to the header.

alon1853
12-08-2010, 04:56 AM
umm , Lynne thanks for ur posting
but this is what im talking about , is there a way to move the navbar into the header to interagate header + navbar in same,
but i dont want to put header in navbar i want to put navbar onto header
Can i do this,and if i can
Please Help Me
Thanks.

vbenhancer
12-08-2010, 10:51 AM
why do you want the two templates to be merged at first? they are coded seperately for specific reasons... and they are not for design, but for functionalities...

so instead of praying for someone to help, give us details of the reasons you need this to be done...:)

Lynne
12-08-2010, 01:48 PM
umm , Lynne thanks for ur posting
but this is what im talking about , is there a way to move the navbar into the header to interagate header + navbar in same,
but i dont want to put header in navbar i want to put navbar onto header
Can i do this,and if i can
Please Help Me
Thanks.
I know. And the only way you can move the navbar code into the header is if you render the header after the navbar template. The header template is rendered when you call global.php. In the showthread template, for instance, that is on line 110. The navbar template gets rendered much later, again, in the showthread template, that is on line 2118. So, you can't put something that isn't rendered (the navbar) into a template that is already rendered (the header) without rearranging the code so that the navbar is rendered *before* the header is rendered.

alon1853
12-08-2010, 02:07 PM
umm,
okay thanks for the help
in the end i did this.
header template:
<a name="top"></a>
and in the navbar i merged with header
thanks for help.