3214 Posts in 848 Topics by 810 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 216 Views |
-
Dynamic argument in template

28 November 2012 at 3:42pm
Hi,I have a Title but it's so long,i want to cut string with 40 character and i write a function for do it.
function cutString($name,$limit)
{
....write code
}And in template,i want to insert $Name and $Description(two field in database) into argument of cutString function
But it's not work.
I write <% control cutString($Name,40) %><% end_control %> not work
I write $cutString($Name,40) not work
I write $cutString(Name,40) not work
I don't know how can implement function with dynamic argument in template
-
Re: Dynamic argument in template

28 November 2012 at 7:53pm
Answer is *not possible* sorry.
If you are using SS3 answer is - yes - possible.
Best I can advise in SS2.x.x is this http://www.silverstripe.org/template-questions/show/13619#post304007#post304007
Good luck!
| 216 Views | ||
|
Page:
1
|
Go to Top |


