|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
legoxx Smarty n00b
Joined: 05 Jan 2005 Posts: 3
|
Posted: Wed Jan 05, 2005 4:11 pm Post subject: plugins input |
|
|
Hello
I have created plugin and i need to feed it with come concat string
ex.
{myPlugin var="hello".$val2|upper}
{myPlugin var="world".$val3|upper}
or more specific
{plan class="BG2" name="<li>".Term loans"|i18n}
is it possible?
thank you |
|
Back to top |
|
legoxx Smarty n00b
Joined: 05 Jan 2005 Posts: 3
|
Posted: Wed Jan 05, 2005 4:52 pm Post subject: how i did it |
|
|
It works but it's quite ugly
{assign var=tmp value="Mortgage loans"|i18n}
{plan class="BG1" name="<li>$tmp" now=$lob.A4 old=$lob.A4_OLD plan=$lob.A4_PLAN} |
|
Back to top |
|
mohrt Administrator
Joined: 16 Apr 2003 Posts: 7368 Location: Lincoln Nebraska, USA
|
Posted: Wed Jan 05, 2005 5:37 pm Post subject: |
|
|
{myPlugin var="hello"|cat:$val2|upper} |
|
Back to top |
|
legoxx Smarty n00b
Joined: 05 Jan 2005 Posts: 3
|
Posted: Mon Jan 10, 2005 11:53 am Post subject: |
|
|
that will apply upper to whole string,
i would like to have
"hello".upper($val2) not upper("hello".$val2)
thanks |
|
Back to top |
|
messju Administrator
Joined: 16 Apr 2003 Posts: 3336 Location: Oldenburg, Germany
|
Posted: Mon Jan 10, 2005 12:13 pm Post subject: |
|
|
{$val2|upper|string_format:"hello %s"} |
|
Back to top |
|
|
|
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
|