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.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

General Questions /

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

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

Pass template value through function


Go to End


3 Posts   1624 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, 5523 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