Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Pass template value through function


Reply


3 Posts   1219 Views

Avatar
DeklinKelly

Community Member, 197 Posts

6 July 2009 at 2:07am

How can I pass a dynamic value (from the database) to a function from a .ss template?

$customFunction($Value)

Avatar
Willr

Forum Moderator, 5513 Posts

6 July 2009 at 8:57am

The template parser does not support this. You will have to define another function which does not rely on a variable

Avatar
DeklinKelly

Community Member, 197 Posts

6 July 2009 at 11:32am

So how can a funtion get a value from the database?
I have posted a related question here:

http://silverstripe.org/general-questions/show/264030