Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.
Modifier smarty:nodefaults does not work any more in v3!

 
Post new topic   Reply to topic    Smarty Forum Index -> Documentation
View previous topic :: View next topic  
Author Message
czvacek
Smarty n00b


Joined: 12 Jan 2011
Posts: 2

PostPosted: Wed Jan 12, 2011 10:42 pm    Post subject: Modifier smarty:nodefaults does not work any more in v3! Reply with quote

I'm getting

Uncaught exception 'SmartyCompilerException' with message 'Syntax Error in template "./templates/lng_deu/index.tpl" on line 52 "{$main|smarty:nodefaults}" unknown modifier "smarty"' in

... and so forth

when using this smarty code:

{$main|smarty:nodefaults}

I'm using v3.0.6

I do hope it's a documentation problem.
The code in "Smarty Internal Plugin Compile Print Expression" checks for

$_attr['nofilter']

Not sure how to achieve this attribute.

This post postulates that the support is completely removed, but this isn't true, obviously. http://www.smarty.net/forums/viewtopic.php?p=62207
My variables get filtered automatically if I assign

$this->default_modifiers = array('escape:"htmlall"');

to my smarty instance.

Please update docs (and tell me how to achieve nodefaults or nofilter) !

clemens
Back to top
View user's profile Send private message
czvacek
Smarty n00b


Joined: 12 Jan 2011
Posts: 2

PostPosted: Wed Jan 12, 2011 11:01 pm    Post subject: Reply with quote

The solution is to use {$var nofilter} instead.
Took me a while to resolve this.
Please do update documentation.
Back to top
View user's profile Send private message
U.Tews
Administrator


Joined: 22 Nov 2006
Posts: 4673
Location: Hamburg / Germany

PostPosted: Wed Jan 12, 2011 11:03 pm    Post subject: Reply with quote

Yes, just recognized that this is an error in documentation...
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Smarty Forum Index -> Documentation All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


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