Jump to:

1851 Posts in 1606 Topics by 561 members

Blog Module

SilverStripe Forums » Blog Module » remove extra fields in cms for blog tree

Discuss the Blog Module.

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

Page: 1
Go to End
Author Topic: 721 Views
  • michael_geeky
    Avatar
    Community Member
    10 Posts

    remove extra fields in cms for blog tree Link to this post

    Hi All,

    I have this strange issue with updateCMSFields() for blog tree. I try to remove some fields in the cms for blog tree page type. I am using 0.6.0, and I noticed in BlogTree.php, there is no SiteTree::disableCMSFieldsExtensions() and SiteTree::enableCMSFieldsExtensions() being called around the parent::getCMSFields() method. I added those and of course, I added $this->extend('updateCMSFields', $fields) right before returning the fields.

    In the extension, I just use normal removeByName() just like what I did in BlogHolder and BlogEntry extensions. And I surely added entries in the _config.php file. The strange thing is BlogHolder and BlogEntry extensions work as expected, only BlogTree extension doesn't seem to do nothing!

    Thanks in advance! This is really driving me crazy.

    Michael

  • michael_geeky
    Avatar
    Community Member
    10 Posts

    Re: remove extra fields in cms for blog tree Link to this post

    Solved! The 0.6.0 version uses an extension inside the widget directory, rather than using my own extension class.

    721 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.