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, Ed, biapar, Willr, Ingo, swaiba

Disabling Requirements from controller

Go to End

2 Posts   363 Views


Community Member, 5 Posts

30 April 2014 at 10:06pm

From looking at SSViewer it is possible to disable the output of Requirements to the template via the 'includeRequirements(true/false)' method - however I can't work out how to access the instance of SSViewer from my controller to be able to set this option.

I've tried things like this within my action:

$viewer = $this->getViewer($this->getAction());

and it doesn't seem to make any difference... any help would be appreciated.



Forum Moderator, 1203 Posts

4 May 2014 at 9:44pm

I'm not sure what you are trying to do, and I've never used this function. So just to make sure: are you aiming at removing one or more requirements that are, for instance, loaded from another module? In that case have a look at clearing and blocking: