Hiding Single Pages in a Package

Permalink 1 user found helpful
I am developing a package that uses several single pages. When the package is installed these pages appear in the main Navbar on the site, but I would like them to be hidden (like the 'page_not_found' page) so that the user does not jump to them directly. How do I do this in the package installation controller?

 
jordanlev replied on at Permalink Best Answer Reply
jordanlev
public function install() {
   $pkg = parent::install();
   Loader::model('single_page');
   $my_hidden_page = SinglePage::add('/my_hidden_page', $pkg);
   $my_hidden_page->setAttribute('exclude_nav', 1);
}
kjk95 replied on at Permalink Reply
Excellent - this works fine, thanks
anjanasolanki replied on at Permalink Reply
anjanasolanki
I have same issue but my single page is not in any packages its in a single page folder ..
So is there any way to hide this page??
JohntheFish replied on at Permalink Reply
JohntheFish
Visit the page and page properties to set the exclude nav attribute. If you cant visit it on the front end (because it is in the dashboard), you can set the properties from the sitemap.
anjanasolanki replied on at Permalink Reply
anjanasolanki
I want to remove single page from search . It must not come in front-end...
cjramki replied on at Permalink Reply 4 Attachments
cjramki
Hi anjanasolanki,

John already explained solution for your problem...
let me explain it briefly...

step 1: go to
dashboard->full site map

site map screen will be display...

step 2: click on the single page which one you want to hide from front-end and choose properties.

step 3: The page properties screen will be display. Select "custom attributes" tab.

step 4: The Navigation and indexing section contains the facility what you need...

here by i attached sample sample screen shots for these steps.