Smarty 3 and {php} (General)

by edkgb, Sunday, September 04, 2011, 13:26 (4640 days ago) @ Alex

Hi again!

{php}
include( $_SERVER['DOCUMENT_ROOT'].'/public/includes/navbar.inc');
{/php}


Is navbar.inc a php script? Otherwise I would just use {include}:

{include file="$theme/subtemplates/navbar.inc"}

Alex

Hi Alex,

Its just a file comprising <ul><li>hrefs with some class and id statements.

I tried {include '**'} and {include_php '**'} and {include file '**'}but they didn't work.

The inc file can't really be located in subtemplates as its used by a lot of my site and would mean doing a fairly major change.

Eddie


Complete thread:

 RSS Feed of thread