Navigator hide current page

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
oakstreet
Forum Members
Forum Members
Posts: 12
Joined: Fri Aug 09, 2019 7:28 pm

Navigator hide current page

Post by oakstreet »

Hey there,
I am creating a recipe website and want to hide the current page on the navigator menu. Im pretty sure there is an easy way to do this using the design template, omitting the active page, but my brain is wired upside down today and I can't seem to find it. Help below is clearly not it?

Code: Select all

{Navigator template='bandb_topnav' childrenof='oktoberfest-recipes' current='false'} 
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Navigator hide current page

Post by Dr.CSS »

I think the best way would be to use CSS to hide it...

.current-page { visibility: hidden}
oakstreet
Forum Members
Forum Members
Posts: 12
Joined: Fri Aug 09, 2019 7:28 pm

Re: Navigator hide current page

Post by oakstreet »

wouldn't that still take up space in the navigation?
oakstreet
Forum Members
Forum Members
Posts: 12
Joined: Fri Aug 09, 2019 7:28 pm

Re: Navigator hide current page

Post by oakstreet »

So I found out how to remove the current page using its specific alias using excludeprefix="". I was hoping It could trigger the active page. That way I wouldn't have to change the code for each page.
User avatar
DIGI3
Dev Team Member
Dev Team Member
Posts: 1800
Joined: Wed Feb 25, 2009 4:25 am

Re: Navigator hide current page

Post by DIGI3 »

Assuming the Navigator call is in your template, you can exlude_prefix=$page_alias, which will exclude the current page.

If the Navigator call is in your page content, then you'd either have to edit the tag on each page to include that parameter, or edit your Navigator template to exclude the current page {if $page_alias == $node->alias}don't do anything{else}do stuff{/if}

You can also just hide it with css as mentioned, it doesn't "take up space" if it's hidden - unless you're talking about the actual code existing - which is pretty minor in the grand scheme of things.
Not getting the answer you need? CMSMS support options
oakstreet
Forum Members
Forum Members
Posts: 12
Joined: Fri Aug 09, 2019 7:28 pm

Re: Navigator hide current page

Post by oakstreet »

Thank you, that answers my question.
Post Reply

Return to “CMSMS Core”