Autonav Hardcode question
Permalink
Hi,
I'm using the following code to show the subpages of one headnav item in a div and in another div I change the cParentID number to show the subpages of another headernav (like in a footermenu).
<?php
$bt = BlockType::getByHandle('autonav');
$bt->controller->cParentID = 85;
$bt->controller->displayPages = 'current';
$bt->controller->orderBy = 'display_asc';
$bt->render('view');
?>
Instead of
$bt->controller->cParentID = 85;
I would like to use the page alias NAME of the headernav page instead of a number.
Is this possible?
Thanks in advance,
Mirjam
I'm using the following code to show the subpages of one headnav item in a div and in another div I change the cParentID number to show the subpages of another headernav (like in a footermenu).
<?php
$bt = BlockType::getByHandle('autonav');
$bt->controller->cParentID = 85;
$bt->controller->displayPages = 'current';
$bt->controller->orderBy = 'display_asc';
$bt->render('view');
?>
Instead of
$bt->controller->cParentID = 85;
I would like to use the page alias NAME of the headernav page instead of a number.
Is this possible?
Thanks in advance,
Mirjam
Mind if i ask why you need to do that? It'll still work with pretty URLs rven if it's calling the pageefrom the ID.
The reason why is that I have installed the site local.
When I upload the php templates the PageID's are not the same when I create the site online.
When I have the names I only need to name the pages in C5 online the same as local and it will work. Else I have to change every page template with new ID's.
Hope this is clear?
When I upload the php templates the PageID's are not the same when I create the site online.
When I have the names I only need to name the pages in C5 online the same as local and it will work. Else I have to change every page template with new ID's.
Hope this is clear?