[Solved] Will {foot...
 
Notifications
Clear all

[Solved] Will {footer} work if placed outside of the footer.tpl?

3 Posts
3 Users
0 Reactions
1,539 Views
(@angelike-riddle)
Posts: 46
Eminent Member
Topic starter
 

I don't have an open site to direct you to for an example, but for the purpose of one of my layouts I need to place my {footer} in my header.tpl rather than footer.tpl. When I attempted this, the {footer} text did not appear in the header of the layout. It was just blank. Is there some piece of code I should be looking at to make this action possible?


 
Posted : 15/05/2009 10:32 pm
(@lyndsie)
Posts: 1263
Member Moderator
 

It looks like the footer is actually set up something like a block on the index page. It's found in includes/pagesetup.php, there's no footer.php. So the tpl->assign for the footer is actually inside the footer "block" and that's probably why it's not working in the header. I haven't played with this so I don't know if you can achieve what you're after.

Lines 93-100:


if($action != "printable") {
$tpl->newBlock("footer");
$copy = dbquery("SELECT message_text FROM ".TABLEPREFIX."fanfiction_messages WHERE message_name = 'copyright' LIMIT 1");
if($copy) list($copyright) = dbrow($copy);
$tpl->assign( "footer", $copyright);
$tpl->gotoBlock( "_ROOT" );
}

 
Posted : 17/05/2009 12:31 am
(@tammy)
Posts: 2577
Member Moderator
 

Change:


$tpl->assign( "footer", $copyright);

To:


$tpl->assignGlobal( "footer", $copyright);

 
Posted : 19/05/2009 3:24 pm
Share: