PDA

View Full Version : $pagenav in postbit_legacy


SDB
01-23-2007, 09:33 AM
Hi

I want to use $pagenav in the postbit_legacy template (long story!! :D), but I assume it hasn't been built by the time postbit_legacy is parsed.

I don't mind duplicating the work to construct $pagenav if I have to, as it will only be on a very small number of pageviews.

Any pointers on what code constructs is, and which hook I should drop it into would be great.

Cheers

Simon

thincom2000
01-25-2007, 05:15 AM
I actually did something similar today (parsing other templates inside postbits).

First I would check to see if $pagenav is created ahead of the postbits, which I believe is the case.

In order to get any non-$post variable or string into a $postbit you need to add it to the $post array. For example, right before

eval('$postbits .= "' . fetch_template($templatename) . '";');

you would add:
$post['pagenav'] = $pagenav;

and then in your postbit_legacy template you would call $post[pagenav]

Hope this helps at all.

Adrian Schneider
01-25-2007, 05:17 AM
$GLOBALS[pagenav] should work, too.

ormand
01-25-2007, 11:13 AM
$GLOBALS[pagenav] should work, too.


$GLOBAL[pageheader] will most definently work:up:

SDB
01-25-2007, 11:38 AM
great..
thank you guys :)