Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.

Search found 13 matches
Smarty Forum Index
Author Message
  Topic: [Bug] using Smarty_Data forces caching
eposjk

Replies: 3
Views: 5874

PostForum: Smarty 3   Posted: Fri Oct 09, 2009 8:55 pm   Subject: [Bug] using Smarty_Data forces caching
no problem & thanks - enjoy your journey!
  Topic: [Bug] using Smarty_Data forces caching
eposjk

Replies: 3
Views: 5874

PostForum: Smarty 3   Posted: Fri Oct 09, 2009 7:35 pm   Subject: [Bug] using Smarty_Data forces caching
Hi!

I discovered a strange behaviour:

When I call $smarty->fetch('my.tpl', $data) multiple times with a different data object, it always returns the results of the first call.

$smarty-> ...
  Topic: assign_by_ref does not work with Smarty3
eposjk

Replies: 11
Views: 16739

PostForum: Smarty 3   Posted: Fri Oct 09, 2009 3:38 pm   Subject: assign_by_ref does not work with Smarty3
@Michael White: Thanks!

@mohrt: That sounds great!
  Topic: How to call a template from PHP without old variables
eposjk

Replies: 1
Views: 4671

PostForum: Smarty 3   Posted: Fri Oct 09, 2009 9:12 am   Subject: How to call a template from PHP without old variables
I found it out myself - reading the code helps!
$data = new Smarty_Data( array() );
sets up a variable context which ignores the variables defined before!
  Topic: assign_by_ref does not work with Smarty3
eposjk

Replies: 11
Views: 16739

PostForum: Smarty 3   Posted: Fri Oct 09, 2009 9:01 am   Subject: Re: Discontinuation of _by_ref ... ?
I can post the code if anyone is interested but it has only been lightly tested as it is essentially just a proof of concept and a hack to support my existing code.
This would be great!
  Topic: How to call a template from PHP without old variables
eposjk

Replies: 1
Views: 4671

PostForum: Smarty 3   Posted: Thu Oct 08, 2009 4:42 pm   Subject: How to call a template from PHP without old variables
How can a template be called from PHP and ensured that optional variables are empty?

Is there a way to do something like {include} did (at least in Smarty2) - call a template and delete(suspend) al ...
  Topic: assign_by_ref does not work with Smarty3
eposjk

Replies: 11
Views: 16739

PostForum: Smarty 3   Posted: Thu Oct 08, 2009 4:21 pm   Subject: assign_by_ref does not work with Smarty3
For me, its not about if it can be done with some central architecture changes in application code - the question is "Can Smarty3 be used as drop-in replacement for Smarty2 with no (or maybe a fe ...
  Topic: Smarty 3 doesn't like {if}{/capture}{capture}{/if}
eposjk

Replies: 8
Views: 10429

PostForum: Smarty 3   Posted: Thu Oct 08, 2009 8:50 am   Subject: Smarty 3 doesn't like {if}{/capture}{capture}{/if}
What about having two Smarty3 versions (or one with a mode switch):
one dropin-replacement version/mode for Smarty2 code
one strict version/mode for new code
  Topic: assign_by_ref does not work with Smarty3
eposjk

Replies: 11
Views: 16739

PostForum: Smarty 3   Posted: Thu Oct 08, 2009 8:45 am   Subject: assign_by_ref does not work with Smarty3
I wrote my own framework which has a base function which reads and assigns data from one database table. For dialogs which need data from two or more tables I use the base function and change the data ...
  Topic: Smarty 3 doesn't like {if}{/capture}{capture}{/if}
eposjk

Replies: 8
Views: 10429

PostForum: Smarty 3   Posted: Wed Oct 07, 2009 9:20 pm   Subject: Smarty 3 doesn't like {if}{/capture}{capture}{/if}
thanks - works fine!
  Topic: assign_by_ref does not work with Smarty3
eposjk

Replies: 11
Views: 16739

PostForum: Smarty 3   Posted: Wed Oct 07, 2009 9:15 pm   Subject: assign_by_ref does not work with Smarty3
For now, $smarty->assign_by_ref is an alias to $smarty->assign.

Example:
$myarray = array('test' => 1);
$smarty->assign_by_ref('a', $myarray);
$myarray['test'] ...
  Topic: Smarty 3 doesn't like {if}{/capture}{capture}{/if}
eposjk

Replies: 8
Views: 10429

PostForum: Smarty 3   Posted: Wed Oct 07, 2009 7:50 pm   Subject: Smarty 3 doesn't like {if}{/capture}{capture}{/if}
Smarty 3 complains about an unclosed if tag for

{capture name='abc'}
...
{if $a != $b}
{/capture}
{capture name='abc'}
{/if}
...
{/ ...
  Topic: Custom Plugin receives string "Array" instead of r
eposjk

Replies: 2
Views: 8648

PostForum: Smarty 3   Posted: Wed Oct 07, 2009 7:31 pm   Subject: Custom Plugin receives string "Array" instead of r
Hello!

I have a custom plugin: {myinput dropdown="$arrayofoptions"}
$arrayofoptions contains an array.

Inside the PHP plugin code:
For Smarty 2, $params{myinput dropdo ...
 
Page 1 of 1
All times are GMT
Jump to:  


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP