adding a module to my theme like 'header nav'
Permalink
What I'm after is my header nav in the upper right - I've got this sorted
Now I want the sub pages of the current header nav selection in a menu across the centre of my layout.
How do I know what to write in my template to just get:
Children of selected header nav.
You'd get the same effect with using the page_list block. I've done something similar for a gallery but I want to actual code in the theme itself.
how was that? descriptive enough?
Now I want the sub pages of the current header nav selection in a menu across the centre of my layout.
How do I know what to write in my template to just get:
Children of selected header nav.
You'd get the same effect with using the page_list block. I've done something similar for a gallery but I want to actual code in the theme itself.
how was that? descriptive enough?
Check this page for code on how to hard-code blocks into a theme. In order to specify that you only want to display children of the given page you (I believe) need to set the following properties:
Whatever link you meant to add by 'Check this page' didn't get added.
How do you mean to use that bit of php, at the moment I've got -
$a = new Area('header nav');
$a->display($c);
that I need to change to give me the links below this page.
Cheers so far.
How do you mean to use that bit of php, at the moment I've got -
$a = new Area('header nav');
$a->display($c);
that I need to change to give me the links below this page.
Cheers so far.
$bt = BlockType::getByHandle('autonav'); $bt->controller->displayPages = 'below'; $bt->controller->orderBy = 'display_asc'; $bt->controller->displaySubPageLevels = 'all'; $bt->controller->displaySubPages = 'all'; $bt->render('');
something like that?
I think we're on on the right track with this one however it's throwing up errors for me.
include(C:\..\concrete\config/../blocks/autonav/.php) failed to open stream in
\concrete\libraries\block_view.php on line 264
then also
include() [function.include]: Failed opening 'C:\..\concrete\config/../blocks/autonav/.php' for inclusion (include_path='.;C:\xampp\php\PEAR;C:/xampp/htdocs/concrete5.4.0/libraries/3rdparty;C:\xampp\htdocs\concrete5.4.0\concrete\config/../libraries/3rdparty') in C:\..\concrete\libraries\block_view.php on line 264
I've shortened some of the paths for the sake or readability.
include(C:\..\concrete\config/../blocks/autonav/.php) failed to open stream in
\concrete\libraries\block_view.php on line 264
then also
include() [function.include]: Failed opening 'C:\..\concrete\config/../blocks/autonav/.php' for inclusion (include_path='.;C:\xampp\php\PEAR;C:/xampp/htdocs/concrete5.4.0/libraries/3rdparty;C:\xampp\htdocs\concrete5.4.0\concrete\config/../libraries/3rdparty') in C:\..\concrete\libraries\block_view.php on line 264
I've shortened some of the paths for the sake or readability.
Solved this.
I can't 'To use the stock view (rather than a custom template), just call render() with no arguments:'
like this (http://www.concrete5.org/documentation/how-tos/primer-auto-nav-block/) page says at the bottom. I had to use a template 'templates/header_menu' or make my own.
I can't 'To use the stock view (rather than a custom template), just call render() with no arguments:'
$bt->render();
like this (http://www.concrete5.org/documentation/how-tos/primer-auto-nav-block/) page says at the bottom. I had to use a template 'templates/header_menu' or make my own.
Wow, you're right. Sorry about this. I'll update the how-to.
So I've a final question for this, I've looked but I didn't come across the answer.
Where can I find the arguments your passing to the various control settings?
I correctly guessed changing displayPages to 'secondary_level' but where would I find a list of possible options?
I'm after the 'orderBy = alphabetically' effect.
Where can I find the arguments your passing to the various control settings?
I correctly guessed changing displayPages to 'secondary_level' but where would I find a list of possible options?
I'm after the 'orderBy = alphabetically' effect.