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.

Blog Module /

Discuss the Blog Module.

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

Cannot remove Google Sitemap Field from Blog


Go to End


4 Posts   2237 Views

Avatar
DeklinKelly

Community Member, 197 Posts

28 July 2010 at 11:09am

I cannot remove the Google Sitemap field from blog pages. I can remove other fields but the Google Sitemap field will not go away.

      $fields->removeFieldFromTab('Root.Content.GoogleSitemap', 'Priority'); 
      $fields->removeFieldFromTab('Root.Content', 'GoogleSitemap'); 

Can anybody else make it go away?

Avatar
dhensby

Community Member, 253 Posts

28 July 2010 at 12:37pm

Edited: 28/07/2010 12:39pm

I use:

$fields->removeFieldFromTab('Root.Content','GoogleSitemap');

to remove the tab completely.

Edit: I know you said this didn't work, but that is what i use in my Page.php getCMSFields() to remove the tab. Maybe try again?

Avatar
DeklinKelly

Community Member, 197 Posts

28 July 2010 at 12:55pm

Thanks for your reply. I tried that exact code in both Page.php and BlogEntry.php and while I can successfully remove all other fields and tabs, the Google Sitemap Field does not go away.

Avatar
Terry Apodaca

Community Member, 112 Posts

27 January 2011 at 2:05pm

Try this:

$fields->removeByName("GoogleSitemap");