discrepancy using include (attempt #2)

From: Date: Sat, 11 Jan 2003 07:23:40 +0000
Subject: discrepancy using include (attempt #2)
Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-7128@lists.php.net to get a copy of this message
Hi, So I have this code in my template that looks like this: search.tpl -------------------------- { config_load file="settings.cfg" section="global" global=true } { include file="common_header.tpl" pageTitle="Search #siteName#" pageHeader="Search #siteName#" } {* body goes in here *} { include file="common_footer.tpl" } However, the output when I go to view my template is that pageTitle appears like this "Search #siteName#" instead of "Search DoStuff" like it should. However, if I do the following: modified search.tpl -------------------------- { config_load file="settings.cfg" section="global" global=true } { assign var=siteName value=#siteName# } { include file="common_header.tpl" pageTitle="Search $siteName" pageHeader="Search $siteName" } {* body goes in here *} { include file="common_footer.tpl" } It returns the correct output. However, shouldn't the first way work? Why do I have to go about assigning new variables when the first way should work? Is there a better way that doesn't involve assigning pageTitle and pageHeader from the code? Any suggestions? Regards, Paul Lockaby -- Paul Lockaby paul@dostuff.net http://www.dostuff.net

« previous php.smarty.general (#7128) next »