Plugin

Archived
Forum
(read-only)


For official support, visit the official support site »

Google Sitemap Lite

ExpressionEngine 2, ExpressionEngine 3

Back to this add-on's main page
View Other Add-ons From Rein de Vries

     

Hide from Nav not hiding hidden structure pages?

Support (Resolved)

Tidy
Tidy

Hi Rein,
Thanks for this great add-on. I can see that v1.5 has a hide_from_nav parameter to hide pages hidden from the nav in Structure. But I am finding that adding this parameter makes no difference - with or without it, the hidden pages still show up in the sitemap.
Here is my code, am I doing something wrong?

{exp:google_sitemap_lite:generate type="structure" use_hide_from_nav="yes" mode="pages"

Thanks

Reinos
# 1
Developer
Reinos

Hi Tidy,

Thanks :-)

I will look into this problem this week. I let you know when i fix this

- Rein

Reinos
# 2
Developer
Reinos

Hi Tidy,

Can you confirm that you run v1.5 When i run your code it works perfect.

Regards,
Rein

Tidy
# 3
Tidy

Thanks for looking into this Rein. I am running
Google Sitemap Lite 1.5
Structure 3.3.4
EE 2.5.3
My template just has the one line of code in it, but it includes all pages in the structure tree even though several are marked as hidden from nav:

{exp:google_sitemap_lite:generate type="structure" use_hide_from_nav="yes" mode="pages"
Reinos
# 4
Developer
Reinos

Do you have a login for me so i can check the template and entry settings.
I think the code is ok, but there must be an mismatch in some configs.

I just need access to the template and the entries.

Mail me at : info[at]reinos[dot]nl

Tidy
# 5
Tidy

Hi Rein,
Many thanks for offering to take the time and trouble to look into this for me.
Unfortunately the client is not comfortable with granting CP access at this time, so I realise that you cannot troubleshoot any further.
Thanks again for all your help.

Reinos
# 6
Developer
Reinos

Oke :-)

Let me know if you need me.

Cheers,
Rein

b1gw0rm
# 7
b1gw0rm

I was having the same issue with hidden structure pages showing up in the XML listing. What I found, is that for my site the $entry_id variable was not being set and so it was failing to match a page entry_id with the list of entry_id numbers in the $hide_from_nav array.

Replace the if statement starting at line 454 with the following:

if(!$entry_id array_search($uri_segment$page_uris))
{
     $entry_id 
array_search($uri_segment.'/'$page_uris);

Changing ‘/’.$uri_segment to $uri_segment.’/’

Reinos
# 8
Developer
Reinos
b1gw0rm - 18 December 2012 05:51 PM

I was having the same issue with hidden structure pages showing up in the XML listing. What I found, is that for my site the $entry_id variable was not being set and so it was failing to match a page entry_id with the list of entry_id numbers in the $hide_from_nav array.

Replace the if statement starting at line 454 with the following:

if(!$entry_id array_search($uri_segment$page_uris))
{
     $entry_id 
array_search($uri_segment.'/'$page_uris);

Changing ‘/’.$uri_segment to $uri_segment.’/’

Thanks for finding a good solution.

Can you check version 1.5.1, added the fix in this version.

Regards,
Rein

b1gw0rm
# 9
b1gw0rm

I will test the 1.5.1 and let you know if I have any problems. Thank you very much for creating this extremely useful and easy to use plugin.