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.

Customising the CMS /

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

Set default for Sitemap Priority


Go to End


3 Posts   1782 Views

Avatar
johannes

Community Member, 20 Posts

13 October 2010 at 8:32am

Hi there,

I try to set a default value for a page type, but

public static $defaults = array('Priority' => -1);

doesn't help.

Is there a way to set a default, because the page shall not appear in it and I don't think the editor will even know what a sitemap is.

Avatar
swaiba

Forum Moderator, 1899 Posts

24 October 2010 at 3:39am

How about...

public function populateDefaults()
{
	parent::populateDefaults();

	$this->Priority= $ -1;

}

Avatar
cSGermany

Community Member, 37 Posts

9 September 2013 at 3:05am

Hi
I've got the same problem. Is there a way to do this in ss 3.0.5 ?

Thx in advance

cSGermany