Exclude from Nav and Page List
Permalink
This is causing some real issues for me guys. I have a news list (I'm using page lists to do this) that i do not want to show in the nav. I was able to do it in the old c5 however i guess these are now new inclusions. Any ideas how to hide these in the nav?
I want to simply display a page list, but it seems in order to do have pages included in the page list that it must NOT be excluded when using autonav.
Hope that makes more sense.
Hope that makes more sense.
yeah.. wow the impact of these seemingly innocuous decisions is impressive these days...
so when we first made that exclude from nav custom attribute it only worked with autonav, and people pointed out page lists were navigations and it should work there too.
That made sense, so we made the same parameter control both, and all sorts of unexpected results happened for folks, including us...
Now you're pointing out (correctly) that you may want to be able to control one without the other.
I think we'll have to split this out to be its own custom attribute for auto-nav and its own for page list with the next version of c5.. although at this point it might be wiser to just introduce two new attributes so we dont step on any toes...
shew.
so when we first made that exclude from nav custom attribute it only worked with autonav, and people pointed out page lists were navigations and it should work there too.
That made sense, so we made the same parameter control both, and all sorts of unexpected results happened for folks, including us...
Now you're pointing out (correctly) that you may want to be able to control one without the other.
I think we'll have to split this out to be its own custom attribute for auto-nav and its own for page list with the next version of c5.. although at this point it might be wiser to just introduce two new attributes so we dont step on any toes...
shew.
Sorry for posting all over the forum about this issue, didn't realize that this is something that is being addressed in the next release (5.3.3 I assume?).
Is there any way around this in the meantime?
I need to hide pages in my autnoav that should appear in page list blocks...
Thanks
osu
Is there any way around this in the meantime?
I need to hide pages in my autnoav that should appear in page list blocks...
Thanks
osu
should be in the page list block's controller in the getPages() function.
search for the text 'exclude_from_nav'
/concrete/blocks/page_list/controller.php It won't matter if you leave your changes in the core because they'll get wiped when the official fix overwrites it in 5.3.3
of course, only do this if you know your way around php.. a little.
search for the text 'exclude_from_nav'
/concrete/blocks/page_list/controller.php It won't matter if you leave your changes in the core because they'll get wiped when the official fix overwrites it in 5.3.3
of course, only do this if you know your way around php.. a little.
For other people wanting to do the same (until the next version of C5 is released):
Rather than hack the core, I copied the controller.php file from:
concrete/blocks/page_list
to
blocks/page_list
And modified this:
$akID = $db->GetOne("select akID from CollectionAttributeKeys where akHandle = 'exclude_nav'");
To this:
$akID = $db->GetOne("select akID from CollectionAttributeKeys");
Seems to have worked well,
Thanks!
Rather than hack the core, I copied the controller.php file from:
concrete/blocks/page_list
to
blocks/page_list
And modified this:
$akID = $db->GetOne("select akID from CollectionAttributeKeys where akHandle = 'exclude_nav'");
To this:
$akID = $db->GetOne("select akID from CollectionAttributeKeys");
Seems to have worked well,
Thanks!
If you did this hack in the core you wouldn't have to remember to remove your fix when you upgrade to 5.3.3 because it'd automatically get wiped.
Doesn't matter either way, just remember to delete your override when you upgrade.
Doesn't matter either way, just remember to delete your override when you upgrade.
as we add more custom attributes to power stuff we're going to stick with the policy of creating a new name instead of reusing the old one.
i don't follow what you're looking for beyond this..