22850 Posts in 9874 Topics by 2803 members
General questions about getting started with SilverStripe that don't fit in any of the categories above.
|Go to End|
22 March 2012 at 3:41pm
I have used the very good Tutorial 2 - extending a basic site to create a table of summaries of sub pages in the same way as the tutorial shows a list of articles. However I want to make the sub pages inaccessible to site visitors as all the information I want to show is in the table of summaries.
Is there a way of doing this? Unpublishing the sub-pages removes them from the table.
I hope this makes sense. Referring to the tutorial I want to hide all the pages of type ArticlePage and only show ArticleHolder.
thanks in advance!
23 March 2012 at 10:35am
// in ArticlePage
static $defaults = array(
'ShowInMenus' => 0
23 March 2012 at 3:04pm
Thanks for this nimesodelta - but I already have that in my code to prevent the subpages appearing in the menus.
What I am wanting is for the pages to be inaccessible - that is return a 404 page if access is attempted.
I want the content to appear in the parent page (ArticleHolder) only.
is this possible?
23 March 2012 at 3:33pm
23 March 2012 at 4:28pm
Thanks for the pointer - and the quick response!
The code you posted gave me function not found error, but the following worked for me
$errorPage = DataObject::get_one('ErrorPage');
|Go to Top|