how to show Children in autonav only when on Child's Parent?
Permalink
So, like, on the HOME PAGE you would see this menu:
HOME
ABOUT US
WHATEVER
But, on ABOUT US, you would see this:
HOME
ABOUT US
> our team
> our neighbors
> our view from the roof
> picures of our moms
> our social security numbers
> all relevant information pertaining to our bank accounts
> all our passwords
> our mothers maiden name
WHATEVER
... get the idea?... seems like a standard situation so there must be an easy C5 integrated feature built in cuz I know enough about C5 to know that the people who built it thought of every damn thing! :-D
HOME
ABOUT US
WHATEVER
But, on ABOUT US, you would see this:
HOME
ABOUT US
> our team
> our neighbors
> our view from the roof
> picures of our moms
> our social security numbers
> all relevant information pertaining to our bank accounts
> all our passwords
> our mothers maiden name
WHATEVER
... get the idea?... seems like a standard situation so there must be an easy C5 integrated feature built in cuz I know enough about C5 to know that the people who built it thought of every damn thing! :-D
$bt = BlockType::getByHandle('autonav'); $bt->controller->displayPages = 'first_level'; $bt->controller->orderBy = 'display_asc'; $bt->controller->displaySubPages = 'relevant'; $bt->controller->displaySubPageLevels = 'enough_plus1'; $bt->render('view');
Thank you so much! I'll give this a shot and mark it as Best Answer if it works for me.
LOL @ "enoughplus1"...why didn't I think of that?! /sarcasm
Any idea where I can find these sort of inner core details? Do you guys just figure it out by sifting through C5 itself or is there some resource I am unaware of?
LOL @ "enoughplus1"...why didn't I think of that?! /sarcasm
Any idea where I can find these sort of inner core details? Do you guys just figure it out by sifting through C5 itself or is there some resource I am unaware of?
You're welcome. Yes, I also love the inventive keywords. They give us a reason to visit the documentations every once in a while... ;-)
My documentations are the following:
1. the API (www.concrete5.org/api/): very useful although there is nearly no written word, but it gives you a perfect overview over the logical structure of c5 and the many, many useful functions.
2. the code itself. I very appreciate the work of c5 developers! The code is that well done to find nearly any answer you need by just analyzing the code.
My documentations are the following:
1. the API (www.concrete5.org/api/): very useful although there is nearly no written word, but it gives you a perfect overview over the logical structure of c5 and the many, many useful functions.
2. the code itself. I very appreciate the work of c5 developers! The code is that well done to find nearly any answer you need by just analyzing the code.
I agree, as far as I am able to understand these things, the code is freaking amazing. I've bookmarked that API for later use, but as of now it makes no sense to me. I see phrases of code, but no idea how to put them together. But, that is MY limitation due to basic ignorance of PHP. I know enough about PHP to know I don't really know PHP. :)
New question (if you're still around)...
How can I get the subpages of a certain page AND that page?
I am using this currently, which DOES get the subpages of cID '116' but it doesn't actually include 116 itself in the menu:
Since cID '116' is the "Members Home" link, it's an important link.
...
How can I get the subpages of a certain page AND that page?
I am using this currently, which DOES get the subpages of cID '116' but it doesn't actually include 116 itself in the menu:
$bt_main =BlockType::getByHandle('autonav'); $bt_main->controller->displayPages = 'custom'; //need to get subpages of Members Area CID $bt_main->controller->orderBy ='display_asc'; $bt_main->controller->displaySubPages ='none'; $bt_main->controller->displayPagesCID = '116'; //Members Area CID $bt_main->render('templates/header_menu');
Since cID '116' is the "Members Home" link, it's an important link.
...
For future reference, this question was answered here:http://www.concrete5.org/index.php?cID=213107...
$bt_main =BlockType::getByHandle('autonav');
$bt_main->controller->displayPages = 'top';
$bt_main->controller->orderBy ='display_asc';
$bt_main->controller->displaySubPageLevels = 'current';
$bt_main->controller->displaySubPages = 'all';
$bt_main->render('templates/level1');
... but $bt_main->controller->displaySubPageLevels = 'current'; is not working.