Sorting autonav by sitemap order (using $bt->controller->orderBy )
Permalink
Hi guys,
I'm trying to set up a theme, where I need an autonav to show up sorted in sitemap order.
I can't figure out what to put in to make it work.
I believe I need to edit
but I have no idea what to put in instead?
Thank you! :)
Jesper
I'm trying to set up a theme, where I need an autonav to show up sorted in sitemap order.
I can't figure out what to put in to make it work.
I believe I need to edit
$bt->controller->orderBy = 'display_asc';
but I have no idea what to put in instead?
Thank you! :)
Jesper
I don't understand what you are asking. The autonav block sorts by sitemap order by default, unless you set it to something else in the edit dialog.
Hi Travis,
I'm not editing the block through the CMS interface, but trying to add the block directly in the .php file in the theme.
So I can't really just 'edit' the block.
If I remove the
line, the block doesn't work right.
Thank you again,
Jesper
I'm not editing the block through the CMS interface, but trying to add the block directly in the .php file in the theme.
So I can't really just 'edit' the block.
If I remove the
$bt->controller->orderBy = 'display_asc';
line, the block doesn't work right.
Thank you again,
Jesper
I'm almost too embarrassed to write this, but I found the error:
For some reason I accidently made some changes to the controller.php file in the autonav block, so it screwed up the sorting.
When I replaced the controller.php with a clean copy, everything worked fine!
Sorry!!!
Jesper :)
For some reason I accidently made some changes to the controller.php file in the autonav block, so it screwed up the sorting.
When I replaced the controller.php with a clean copy, everything worked fine!
Sorry!!!
Jesper :)