23478 Posts in 18941 Topics by 2878 members
|Go to End|
14 October 2010 at 4:46am Last edited: 14 October 2010 4:50am
I would like a certain page class not show in a menu as the default.
I have tried this in my page class.
static $ShowInMenus = false;
but this does not work.
Had a trawl through the forums and api documentation, but can't seem to find anything.
Is this even possible? If so how? And where is this documented, I am sure there other useful stuff I could learn from the page that gives this information!
Thanks in advance.
14 October 2010 at 5:37am
Something like this?
static $defaults = array(
'ShowInMenus' => false
14 October 2010 at 5:42am
Pefect. That's do then trick. Many thanks!
Can you direct me to where this documented so I can investigate what other items can have their default values modified.
14 October 2010 at 5:46am
Well I remember it from here... http://doc.silverstripe.org/tutorial:2-extending-a-basic-site#allowing_comments_on_news_articles
but for the documentation... http://api.silverstripe.org/trunk/sapphire/model/DataObject.html#var$defaults
FYI I keep a shortcut to the DataObject, DataObjectSet, SiteTree & FieldSet as these are ones I always use.
Other than that http://api.silverstripe.org/trunk/elementindex.html and then Ctrl+F
14 October 2010 at 6:02am
Thanks again. Very helpful.
|Go to Top|