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.

General Questions

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Container Pages


Reply

4 Posts   1227 Views

Avatar
D.K.

13 February 2009 at 5:16pm (Last edited: 13 February 2009 5:20pm), Community Member, 20 Posts

I'm using the nestedurls branch to power my website. Can I create a content type that seems like a page to SS but cannot be directly accessed? Currently I can create a /content/abc URL by create a content page and an abc page (with the actual content) under it. But this means that I need to put content in the content page, which I do not want. How can I create a container page that adds to the structure of the site tree, but cannot be directly accessed? (/content returns 404, but /content/abc doesn't)

Thanks in advance.

Avatar
D.K.

13 February 2009 at 6:01pm Community Member, 20 Posts

I can restrict the /content page's access rules to just Adminstrator viewing, but it is very crude, as the links still show in the nav menus and if anonymous tries to visit /content, they get a nice login screen that says "That page is secured. Enter your credentials below and we will send you right along.", but no one will be sent along, as it is an Administrator only page. Is there a way to create a page that no one can access, does not show in nav, just performs the function of improving the site URL structure?

Avatar
ajshort

13 February 2009 at 6:12pm Community Member, 244 Posts

Just do the restrict to admin thing, and theres also a little checkbox in the Beahviour tab that allows you to hide the page from menus and search results. I think this is what your looking for?

Avatar
D.K.

14 February 2009 at 4:09am (Last edited: 14 February 2009 4:17am), Community Member, 20 Posts

Sure, that would work. But is there a way for it to return the 404 page (on the protected page, if credentials are not applied) instead of a login screen?