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.

Customising the CMS /

SS3: Hide custom pages from CMS tree


Reply


4 Posts   653 Views

Avatar
kingsizeslim

Community Member, 3 Posts

13 October 2012 at 2:45am

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

Avatar
kingsizeslim

Community Member, 3 Posts

17 October 2012 at 1:13am

Someone can help me? Thanks!

Avatar
martimiz

Forum Moderator, 1132 Posts

24 October 2012 at 12:03am

Edited: 24/10/2012 12:05am

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

Avatar
kingsizeslim

Community Member, 3 Posts

25 October 2012 at 11:17pm

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!