Option to hide pages from Site Mapper
-
- Power Poster
- Posts: 265
- Joined: Mon Mar 14, 2011 1:16 am
- Location: Brisbane, Australia
Option to hide pages from Site Mapper
I'd like to see an option on each page titled 'Show in site map' (checked by default).
I have several 'Thank you' pages on my site which I want to be 'active' so that they can be seen after submitting the relevant form, but I don't want to display them in the primary navigation. I can achieve both of these things with the current settings, however they then appear in the site map using {site_mapper}.
At present there's no way to hide certain pages from the site mapper except for manually entering the page alias and using some Smarty logic. This is obviously not ideal.
I have several 'Thank you' pages on my site which I want to be 'active' so that they can be seen after submitting the relevant form, but I don't want to display them in the primary navigation. I can achieve both of these things with the current settings, however they then appear in the site map using {site_mapper}.
At present there's no way to hide certain pages from the site mapper except for manually entering the page alias and using some Smarty logic. This is obviously not ideal.
Re: Option to hide pages from Site Mapper
site_mapper is MenuManager basically, so if a page is set to "Show in menu" it is shown in site_mapper.
If parameter "showall" is enabled all pages will be shown, means also pages that have option "Show in menu" unchecked.
The tag {site_mapper} might sound as some standalone module but basically you don't have to use that tag as it is the same as if you were using {menu} and following MenuManager help and parameter options.
If parameter "showall" is enabled all pages will be shown, means also pages that have option "Show in menu" unchecked.
The tag {site_mapper} might sound as some standalone module but basically you don't have to use that tag as it is the same as if you were using {menu} and following MenuManager help and parameter options.
-
- Power Poster
- Posts: 265
- Joined: Mon Mar 14, 2011 1:16 am
- Location: Brisbane, Australia
Re: Option to hide pages from Site Mapper
But doesn't that mean there should be a better way? The only way I thought of doing it was adding a bit of text (e.g. 'hide') into one of the 'Extra1/2/3' attributes, but that means you can't use those fields for other information.
Anyway, it's just an annoyance of mine that there's no quick way to generate a site map and hide particular pages from it, but keep them active and/or in the site navigation.
Anyway, it's just an annoyance of mine that there's no quick way to generate a site map and hide particular pages from it, but keep them active and/or in the site navigation.
Re: Option to hide pages from Site Mapper
Yes, extra attributes would be an option for that.
You might want to submit a FR in Forge and see what happens.
Persoanlly i wasn't in a situation where i had to hide a page in Sitemap which was marked as "show in menu" but you could have a valid point.
You might want to submit a FR in Forge and see what happens.
Persoanlly i wasn't in a situation where i had to hide a page in Sitemap which was marked as "show in menu" but you could have a valid point.
-
- Power Poster
- Posts: 265
- Joined: Mon Mar 14, 2011 1:16 am
- Location: Brisbane, Australia
Re: Option to hide pages from Site Mapper
It's more about the pages that aren't in the menu, but are active (thank you pages, generally). Therefore I don't want them in the site map, even though users can see them after they submit forms.
Re: Option to hide pages from Site Mapper
As mentioned above {site_mapper} has the same behavior as {menu} so if a page is set to "show in menu" it will appear in sitemap else not.
With parameter show_all="1" pages that were set to not show in menu will still be shown, if set to "0" then behavior should be the same as {menu}.
Active/Inactive pages should not show at all, no matter of Menu or Sitemap setting.
With parameter show_all="1" pages that were set to not show in menu will still be shown, if set to "0" then behavior should be the same as {menu}.
Active/Inactive pages should not show at all, no matter of Menu or Sitemap setting.
-
- Power Poster
- Posts: 265
- Joined: Mon Mar 14, 2011 1:16 am
- Location: Brisbane, Australia
Re: Option to hide pages from Site Mapper
I'm possibly just confusing myself here, but I've got some pages with the following settings:
Show in menu: No
Active: Yes
Display on site map: Yes (e.g. a campaign page that users should only find via search engines/advertising)
Then I also have some other pages with:
Show in menu: No
Active: Yes
Display on site map: No (e.g. the site map itself)
How would I approach this?
Show in menu: No
Active: Yes
Display on site map: Yes (e.g. a campaign page that users should only find via search engines/advertising)
Then I also have some other pages with:
Show in menu: No
Active: Yes
Display on site map: No (e.g. the site map itself)
How would I approach this?
Last edited by gocreative on Tue Sep 06, 2011 6:51 am, edited 1 time in total.
Re: Option to hide pages from Site Mapper
Did you try with {menu show_all="0" template="site-map"}?
-
- Power Poster
- Posts: 265
- Joined: Mon Mar 14, 2011 1:16 am
- Location: Brisbane, Australia
Re: Option to hide pages from Site Mapper
Sorry, I've edited my message...uniqu3 wrote:Did you try with {menu show_all="0" template="site-map"}?
Re: Option to hide pages from Site Mapper
{site_mapper show_all='1' exculdeprefix='sitemap'}
-
- Power Poster
- Posts: 265
- Joined: Mon Mar 14, 2011 1:16 am
- Location: Brisbane, Australia
Re: Option to hide pages from Site Mapper
There are multiple pages that will need to be selectively hidden, and multiple that will need to selectively be shown.
I'm sure this isn't a scenario that comes up often, but it's still not easy. Plus, it would be a lot easier to simply check a box than have to edit the function call every time I create/edit/change the alias of a page.
I'm sure this isn't a scenario that comes up often, but it's still not easy. Plus, it would be a lot easier to simply check a box than have to edit the function call every time I create/edit/change the alias of a page.
Re: Option to hide pages from Site Mapper
Exactly thats why i hardly can see it comming into core, it is not common and i didn't see anyone else asking for it.I'm sure this isn't a scenario that comes up often, but it's still not easy
You can still try to submit a FR and see if it makes into core.
Alias shouldn't be changed that offten (think of SEO and Search engine indexing, then you need to redirect that page every time you change it's alias), but still you can use "content_id" that way no matter what you alias is, content id number will never change.Plus, it would be a lot easier to simply check a box than have to edit the function call every time I create/edit/change the alias of a page.
When you edit a page you will see content id in the url bar or when hovering over a page link in backend, so simply enter exculdeprefix='32' for example.
-
- Power Poster
- Posts: 265
- Joined: Mon Mar 14, 2011 1:16 am
- Location: Brisbane, Australia
Re: Option to hide pages from Site Mapper
Yeah, I was mainly thinking about my scenario and whether others would have the same problem. Imagine a site with 200 pages and more created every day, having to go and add that page ID to the list rather than just ticking a box when creating the page.
-
- Forum Members
- Posts: 142
- Joined: Fri Jun 17, 2011 12:22 am
Re: Option to hide pages from Site Mapper
Is this something that you figured out at all? I would like to be able to do this as well.
-
- Power Poster
- Posts: 265
- Joined: Mon Mar 14, 2011 1:16 am
- Location: Brisbane, Australia
Re: Option to hide pages from Site Mapper
I never found a simple solution, but I worked around it by using
and manually entering page aliases into the menu template like this:
Code: Select all
{site_mapper show_all="1"}
Code: Select all
{if $node->alias neq "search-results" && $node->alias neq "site-map" && $node->alias neq "thank-you1" && $node->alias neq "thank-you2" && $node->alias neq "thank-you3"}
<li><a href="{$node->url}"><span>{$node->menutext}</span></a>
{/if}