Jump to:

1851 Posts in 1606 Topics by 561 members

Blog Module

SilverStripe Forums » Blog Module » Blog Page Tree

Discuss the Blog Module.

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

Page: 1
Go to End
Author Topic: 1329 Views
  • e360
    Avatar
    Community Member
    6 Posts

    Blog Page Tree Link to this post

    When I create a "New Blog Entry" from the dropdown menu, the blog entry is created in the main page tree instead of under the blog page tree. I then have to click on "Allow Drag & Drop Editing" and manually drag the blog entry into the blog folder.

    Is this a known issue or bug? I am using SS 2.4.2.

  • jaredkipe
    Avatar
    Community Member
    16 Posts

    Re: Blog Page Tree Link to this post

    Are you highlighting the Parent page BEFORE saying create?

    Namely, if you want to make a child BlogEntry under the page titled 'Blog', you first click/highlight 'Blog' in the left tree, then hit 'Create' at the top, select BlogEntry and hit 'Go'.

  • e360
    Avatar
    Community Member
    6 Posts

    Re: Blog Page Tree Link to this post

    Jared: Yes, I've tried highlighting both the the page titled 'Blog' as well, as individual blog entries, but it still ends up at the bottom of the main page tree.

  • gaethofs
    Avatar
    Community Member
    9 Posts

    Re: Blog Page Tree Link to this post

    I suppose you are using the SS 2.4x version of the blog module? I don't really know what changes have been made,
    but you should make sure the following things are in place (or you could add them to enforce new protocols).

    In the BlogHolder.php the following should be present:

    static $allowed_children = array(
       'BlogEntry'
    );

    And in the BlogEntry.php the following should be present:

    static $default_parent = 'BlogHolder';
       
    static $can_be_root = false;

    When you create a new Blog Entry everything should work fine OR the system would be throwing an exception telling you you can't add new Entries (since can_be_root is disabled).
    But cause I'm working with SS3.xx I'm not sure if this will do the trick .
    Hope it works for you!

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