Difference between revisions of "Assign"
From TMM Wiki
Jump to navigationJump to searchm |
TMMStephenY (talk | contribs) m |
||
Line 35: | Line 35: | ||
[[Category:Also NATS4 Article]] | [[Category:Also NATS4 Article]] | ||
+ | [[Category:Common Parameters]] |
Latest revision as of 15:04, 31 May 2011
NATS 3
|
---|
CARMA
|
---|
The assign parameter to many NATS and CARMA functions lets you change output variable names. For example, the NATS4 template function, nats_decode, creates the following variable by default:
- {$encoded}
Unfortunately, if you already have a Smarty variable named $encoded when you call nats_encode, the new value overwrites the old value. We designed assign to solve this problem. Call nats_encode with an argument to the assign parameter to have its output placed in the variable named by your argument. For example: the following code,
- {nats_encode assign="my_variable"}
puts the output in,
- {$my_variable}