How to get pagelist that exclude from nav?
Permalink
I try to get pagelist that exclude from nav like contact, sitemap, about, etc.
but i can get it till now, can someone help?
i miss something..
but i can get it till now, can someone help?
i miss something..
thanks for the reply thephilm
i try this solution
for some reason, i add this hardcode, not from add block feature.
but now, the system page(or single page like 'confirm sign up' is shown too, i must hide this system page as well, any clue?
i try this solution
Loader::model('page_list'); $pl = new PageList(); $pl->filterByAttribute('exclude_nav',true); //show menu that exclude from nav $pages = $pl->getPage(); foreach($pages as $item){ echo '<a href="'.$item->cPath.'" >'.$item->vObj->cvName.'</a> | '; }
for some reason, i add this hardcode, not from add block feature.
but now, the system page(or single page like 'confirm sign up' is shown too, i must hide this system page as well, any clue?
well, i just add some condition from loop
foreach($pages as $item){
if($item->ctHandle != null) //add this
echo '<a href="'.$item->cPath.'" >'.$item->vObj->cvName.'</a> | ';
}
foreach($pages as $item){
if($item->ctHandle != null) //add this
echo '<a href="'.$item->cPath.'" >'.$item->vObj->cvName.'</a> | ';
}
Hopefully this helps out...
Note - I use this as a way to display my blog posts as an unordered list which have the "exclude from nav" flag.
- Phil