Jump to:

1835 Posts in 1139 Topics by 554 members

Blog Module

SilverStripe Forums » Blog Module » Cannot remove Google Sitemap Field from Blog

Discuss the Blog Module.

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

Page: 1
Go to End
Author Topic: 1553 Views
  • DeklinKelly
    Avatar
    Community Member
    196 Posts

    Cannot remove Google Sitemap Field from Blog Link to this post

    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?

  • Pigeon
    Avatar
    Community Member
    243 Posts

    Re: Cannot remove Google Sitemap Field from Blog Link to this post

    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?

  • DeklinKelly
    Avatar
    Community Member
    196 Posts

    Re: Cannot remove Google Sitemap Field from Blog Link to this post

    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.

  • Terry Apodaca
    Avatar
    Community Member
    109 Posts

    Re: Cannot remove Google Sitemap Field from Blog Link to this post

    Try this:

    $fields->removeByName("GoogleSitemap");

    1553 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.