Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

{var}

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Plugins
View previous topic :: View next topic  
Author Message
jLix
Smarty Regular


Joined: 01 Apr 2009
Posts: 59
Location: Lowlands, EU

PostPosted: Wed Apr 01, 2009 9:43 am    Post subject: {var} Reply with quote

Hello, I've created a tiny Smarty plugin called {var}

(As I'm new to this forum I need 3 posts before I can post the URL where you can find the plugin, so I start off with a little monologue in order to meet this criterium.)
_________________
http://jlix.net/extensions/smarty
Back to top
View user's profile Send private message Visit poster's website
jLix
Smarty Regular


Joined: 01 Apr 2009
Posts: 59
Location: Lowlands, EU

PostPosted: Wed Apr 01, 2009 9:44 am    Post subject: Reply with quote

The {var} function assigns values to template variables in a more intuitive and brief manner than Smarty's default {assign} function. Multiple variables can be assigned in one {var} statement.
_________________
http://jlix.net/extensions/smarty
Back to top
View user's profile Send private message Visit poster's website
jLix
Smarty Regular


Joined: 01 Apr 2009
Posts: 59
Location: Lowlands, EU

PostPosted: Wed Apr 01, 2009 9:44 am    Post subject: Reply with quote

Instead of writing:
Code:
{assign var="welcome" value="Hello world!"}
{assign var="foo" value="bar"}


you can just write:
Code:
{var welcome="Hello world!" foo="bar"}

_________________
http://jlix.net/extensions/smarty
Back to top
View user's profile Send private message Visit poster's website
jLix
Smarty Regular


Joined: 01 Apr 2009
Posts: 59
Location: Lowlands, EU

PostPosted: Wed Apr 01, 2009 9:46 am    Post subject: Reply with quote

(Finally post number 4)

You'll find the plugin on: http://jlix.net/extensions/smarty/var
_________________
http://jlix.net/extensions/smarty
Back to top
View user's profile Send private message Visit poster's website
elpmis
Smarty Elite


Joined: 07 Jun 2007
Posts: 321

PostPosted: Wed Apr 01, 2009 11:20 am    Post subject: Reply with quote

Thx for your plugin - really useful ...
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Plugins 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