Jump to:

23007 Posts in 11866 Topics by 2828 members

General Questions

SilverStripe Forums » General Questions » Container Pages

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

Page: 1
Go to End
Author Topic: 1173 Views
  • D.K.
    Avatar
    Community Member
    20 Posts

    Container Pages Link to this post

    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.

  • D.K.
    Avatar
    Community Member
    20 Posts

    Re: Container Pages Link to this post

    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?

  • ajshort
    Avatar
    Community Member
    244 Posts

    Re: Container Pages Link to this post

    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?

  • D.K.
    Avatar
    Community Member
    20 Posts

    Re: Container Pages Link to this post

    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?

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