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've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

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   1788 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