Jump to:

5450 Posts in 1672 Topics by 1197 members

Customising the CMS

SilverStripe Forums » Customising the CMS » SS3: Hide custom pages from CMS tree

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

Page: 1
Go to End
Author Topic: 538 Views
  • kingsizeslim
    Avatar
    Community Member
    3 Posts

    SS3: Hide custom pages from CMS tree Link to this post

    Hi everyone!

    I've created a custom page type following the tutorial which is a holder for various dataobjects, objects in this pages are editable throught a custom admin section made using model admin. So what I'm trying to do right now is to hide the page holders from the tree to avoid confusion in the end users and to avoid implementing another way to manage contents. Is it possibile extending LeftandMain or something like this? I can't find anything in the docs...

    Right now I'm going to hide contents using CSS but this solution is not as clean as I would like.

    Please help!

    Thanks in advance to everyone and sorry for my horrible english

  • kingsizeslim
    Avatar
    Community Member
    3 Posts

    Re: SS3: Hide custom pages from CMS tree Link to this post

    Someone can help me? Thanks!

  • martimiz
    Avatar
    Forum Moderator
    1035 Posts

    Re: SS3: Hide custom pages from CMS tree Link to this post

    Hi kingsizeslim welcome to the forums,

    I agree that filtering out a page from the SiteTree should be easy, but it isn't - and that's probably why noone has answered your post yet...

    Setting canView() to return false should, in my opinion, exclude the page from the SiteTree instead of showing a 'forbidden' message (SS3) if you navigate to it.

    It might be a good idea to create a ticket for that, see how others think...

    Martine

  • kingsizeslim
    Avatar
    Community Member
    3 Posts

    Re: SS3: Hide custom pages from CMS tree Link to this post

    Hi Martine,
    thanks for your suggestion, it can work, now I'm going to give out a try, for the moment we've bypassed the problem setting "num_childen" to zero to prevent listing on sitetree but it's a little buggy and adds new item when user inserts new pages.
    We've modified some rows in the core to fix some problems but in my opinion this feature needs better implementation by SS's team.

    Anyway I'm going to open a ticket as you suggested.

    Thank you!

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