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.

Template Questions /

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

Adding transient property to my page model for use in my template


Go to End


1402 Views

Avatar
doublecheese

Community Member, 5 Posts

21 December 2015 at 3:57pm

Hi,

I'm a NOOB and I've added a new property on my BlahPage object using the following:

public $Active;

I'm setting this to thru in my page controller, however, when I try to evaluate that in my template using

<% if $Active... it seem to evaluate to false (looks like my model is immutable or something). How do I add a transient field that is not backed by a DB in siverstripe?