Author |
Message |
Topic: Moving from Smarty 2-- how do have {dynamic} blocks? |
pnoeric
Replies: 6
Views: 15690
|
Forum: Smarty 3 Posted: Sun May 27, 2012 7:36 pm Subject: Moving from Smarty 2-- how do have {dynamic} blocks? |
It's hard for smarty to guess where a single quote string should end....
I understand, though I wonder if the parser could be smart enough to recognize it's parsing a filename for an "include& ... |
Topic: Moving from Smarty 2-- how do have {dynamic} blocks? |
pnoeric
Replies: 6
Views: 15690
|
Forum: Smarty 3 Posted: Sun May 27, 2012 7:00 pm Subject: Moving from Smarty 2-- how do have {dynamic} blocks? |
I found the problem-- about 10 lines above the code I posted, I had this:
{include file='nav.box.kindle.tpl}
As you can see, I was missing the trailing single quote.
Soooo... ... |
Topic: Moving from Smarty 2-- how do have {dynamic} blocks? |
pnoeric
Replies: 6
Views: 15690
|
Forum: Smarty 3 Posted: Sun May 27, 2012 6:05 am Subject: Moving from Smarty 2-- how do have {dynamic} blocks? |
Thank you for the reply... sorry about the delay in getting back, but now I am here and really want to get my site moved up to Smarty3
I am trying to upgrade to Smarty v3.1.8.
Here is the ex ... |
Topic: Moving from Smarty 2-- how do have {dynamic} blocks? |
pnoeric
Replies: 6
Views: 15690
|
Forum: Smarty 3 Posted: Tue May 01, 2012 12:01 am Subject: Moving from Smarty 2-- how do have {dynamic} blocks? |
Hi, 2 small questions:
1. I have a pretty big web app that I'm moving from Smarty v2 to v3. I'm using the code from
function smarty_block_dynamic($param, $content, &$smarty) {
... |
Topic: BBEDIT and .tpl file auto syntax colouring |
pnoeric
Replies: 13
Views: 47676
|
Forum: Tips and Tricks Posted: Thu Jul 28, 2011 7:39 pm Subject: BBEDIT and .tpl file auto syntax colouring |
Bump on this for bbedit 9.5. Would love to just have 1 simple feature of being able to have {* comment blocks *} work in bbedit. Anybody got time to work on that one?
I found this-- it's a little ... |
Topic: When doing inline math, modifier ignored? |
pnoeric
Replies: 2
Views: 6232
|
Forum: Bugs Posted: Wed Jun 22, 2011 10:07 pm Subject: When doing inline math, modifier ignored? |
I'm trying to display a percentage discount on a hotel room:
a {$v.newPrice / $rackRate.$k.price * 100|number_format}% discount!
The output is "a 40.9090909091% discount!"... ... |
Topic: Smarty 3: variable variables |
pnoeric
Replies: 10
Views: 83773
|
Forum: Tips and Tricks Posted: Wed Jun 22, 2011 10:03 pm Subject: Smarty 3: variable variables |
Monte, as a long-time Smarty fan, I just wanted to say I'm having a really great time looking at all the Smarty 3 changes and your implementation tips. Thanks again for a terrific bit of software... |
Topic: working around internal is_cached cache |
pnoeric
Replies: 0
Views: 2849
|
Forum: General Posted: Tue Mar 30, 2010 4:10 am Subject: working around internal is_cached cache |
Hi, on the documentation page for is_cached(), I see this:
Technical Note: If is_cached() returns TRUE it actually loads the cached output and stores it internally. Any subsequent call to display() ... |
Topic: reload code without deleting cached templates |
pnoeric
Replies: 2
Views: 4971
|
Forum: General Posted: Wed Feb 03, 2010 2:42 pm Subject: reload code without deleting cached templates |
thanks Monte, I was afraid that might be it. I'll just zap that cache every time best, E |
Topic: reload code without deleting cached templates |
pnoeric
Replies: 2
Views: 4971
|
Forum: General Posted: Fri Jan 29, 2010 12:12 pm Subject: reload code without deleting cached templates |
Hi, I have a site that caches about 300 pages with Smarty... it's awesome... and what I'd like to be able to do is make small tweaks to the code, do a new "build" (which in this case means c ... |
Topic: Passing var from one included tpl to another |
pnoeric
Replies: 8
Views: 19608
|
Forum: General Posted: Tue May 19, 2009 8:45 pm Subject: Passing var from one included tpl to another |
Smarty 3 addresses this problem. Here is a workaround for Smarty 2:
header.tpl:
{capture var="finalVal"}12345{/capture}
footer.tpl:
{$smarty.capture.fina ... |
Topic: Passing var from one included tpl to another |
pnoeric
Replies: 8
Views: 19608
|
Forum: General Posted: Tue May 19, 2009 5:45 pm Subject: Passing var from one included tpl to another |
In footer.tpl, try this:
{php}
global $finalValue;
$this->assign('foo', $finalValue);
{/php}
And then (I guess ) you can use that $foo variable in footer.tpl. ... |
Topic: Passing var from one included tpl to another |
pnoeric
Replies: 8
Views: 19608
|
Forum: General Posted: Tue May 19, 2009 3:34 pm Subject: Passing var from one included tpl to another |
All assignments to Smarty variables within incuded templates have local scope. There is no standard way to pass values back to the calling template.
This restriction does not exist in the new Sm ... |
Topic: Passing var from one included tpl to another |
pnoeric
Replies: 8
Views: 19608
|
Forum: General Posted: Tue May 19, 2009 2:36 pm Subject: Passing var from one included tpl to another |
Include function accepts three parameters (last two are optional), and third is for passing variables between templates, so:
{include file='footer.tpl' foo='bar'}
And after that, you can u ... |
Topic: Passing var from one included tpl to another |
pnoeric
Replies: 8
Views: 19608
|
Forum: General Posted: Tue May 19, 2009 7:14 am Subject: Passing var from one included tpl to another |
I have three template files: main.tpl, header.tpl, header2.tpl and footer.tpl. A value is computed in header2.tpl and I need to have it be available later in the code, in footer.tpl. (See massively si ... |
|