Chance Posted June 24, 2009 Share Posted June 24, 2009 Hi, I am trying to put a single line of code into my header.tpl file so that on every page EXCEPT index.php, the breadcrumb nav links are shown. In the header.tpl file, I have the following in the area where the breadcrumbs are to be shown: {php} if($_SERVER["PHP_SELF"]!="/index.php") echo("Test"); {/php} This code does work and I do see the word 'Test' on every page except the home page, just as I want. But when I try to substitute the echo("Test"); for {$breadcrumbnav} nothing renders, which means my code does not work. Anyone know what I am missing? It is probably something very simple but I cannot find it. I have tried echo("{$breadcrumbnav}"); as well and no errors but no output of bread crumbs either. I do not think it is necessary to have the bread crumb trail on the home page of the client portal area so I am trying to eliminate it on that page only. Any input would be greatly appreciated. Is there an equivalent in smarty for determining the name of the current php script being executed? 0 Quote Link to comment Share on other sites More sharing options...
Chance Posted June 24, 2009 Author Share Posted June 24, 2009 Man, it helps to read the documentation. I came across a snippet of smarty syntax for accessing server side variables, and just put two and two together. Here is the super simple solution to my problem and it works like a charm! {if $smarty.server.SCRIPT_NAME neq "/index.php"} {$breadcrumbnav} {/if} How easy was that!?! 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.