GetSimple Support Forum

Full Version: Sitemap Plugin
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
This topic is about the GetSimple Sitemap plugin. It is a plugin that automatically generates an ordered tree-like sitemap of your pages, giving visitors a complete overview of your website. Comments, bugs and feature requests can be posted here.

Installation

Download the latest version here, unzip the downloaded file and copy its contents to your plugins folder. To show a sitemap, go to the Pages tab and add the following placeholder to a page of your choice:

Code:
(% sitemap %)

Instead of using placeholders you can also add a sitemap directly to your template (in the sidebar for instance), using:

Code:
<?php sm_show(); ?>

That's it, Enjoy!
Great! I will check how it handles pages which are not in the menue or which are marked as private.


As I understand, this is a sitemap for the website, which will be visible in the content
It is not the sitemap.xml which will sit in the root of GetSimple as information for search machines.

just to make things clear, because it is mixed too often ;=)
Connie Wrote:Great! I will check how it handles pages which are not in the menue or which are marked as private.

Pages not in the menu will be included too, pages that are private will be skipped.

Connie Wrote:As I understand, this is a sitemap for the website, which will be visible in the content.
It is not the sitemap.xml which will sit in the root of GetSimple as information for search machines.

That is correct!
roog Wrote:
Connie Wrote:Great! I will check how it handles pages which are not in the menue or which are marked as private.

Pages not in the menu will be included too, pages that are private will be skipped.

Cheers Roog,

I have a page, not in the menue, which I load into the template with "get_page_by_id('aktion')"
I can't use a component instead of this page because the user must be able to use the editor (which is not possible with components)

I do not want to show this page in the sitemap, as it is just a short text...
what to do?

Cheers, Connie

PS: this is a satanic posting: my posting #666 hihihi
Hi roog

Thanks for your plugin. Just installed in for my new website.
I noticed that as link text for the pages, not their actual title but the text that is also shown in the menu is displayed.
I just wanted to say that to me it would make more sense to display the title of the page as there is enough space for it, unlike in the navigation, where often I have to shorten the title. Maybe other users agree with me?!

joene
joene Wrote:I noticed that as link text for the pages, not their actual title but the text that is also shown in the menu is displayed.
I just wanted to say that to me it would make more sense to display the title of the page as there is enough space for it, unlike in the navigation, where often I have to shorten the title. Maybe other users agree with me?!

You can also create a site map with the I18N plugin, see here. It will show the titles.
joene Wrote:Hi roog

Thanks for your plugin. Just installed in for my new website.
I noticed that as link text for the pages, not their actual title but the text that is also shown in the menu is displayed.
I just wanted to say that to me it would make more sense to display the title of the page as there is enough space for it, unlike in the navigation, where often I have to shorten the title. Maybe other users agree with me?!

joene

Hi Joene,

If you want to change the display name, you should have a look at the plugin file and remove line 70 to 72 (if (!empty ... else). That's all.

- Roog
Hi roog,

How can I get it to stop showing the pages that are not in the menu?
andyash Wrote:Hi roog,

How can I get it to stop showing the pages that are not in the menu?

Remove lines 72 and 73 from plugins/sitemap.php.
It removes the links but shows empty bullets instead.
EDIT: Didn't remove the links either. I just assumed it did since it was showing empty bullet points.
If you copy a page (for example, "Gallery"), and then change the name and URL (for example, the "Articles") and save, the plugin provides "Gallery [Copy]" (instead of "Articles") with a link to articles...

PS Sorry, Google translator
@TiXon

It seems this plugin displays the menu text as link title. GetSimple adds "[copy]" not only to the page title, but also to the menu text of cloned pages.
You can change it by editing the cloned page -> Options -> Add page to menu -> menu text.
Edit that field (e.g. leaving it blank), then disable "Add page..." (if it was not enabled) and save the page.

...

However, if you don't want this plugin to take the menu text field as default, you can patch it.

Try this (not tested): edit sitemap.php, go to line 70

Code:
if (!empty($data->menu))
          $pages[$slug]['title'] = stripslashes($data->menu);
        else
          $pages[$slug]['title'] = cl($data->title);

Remove the first 3 lines, leaving only this:

Code:
$pages[$slug]['title'] = cl($data->title);
Carlos, it works!
I deleted those lines and everything is displayed correctly. Thank you!
Hi,

1) I have a question where SiteMap gets outdated names of the parties?
- Change in the admin, the site is new and in the sitemap are old.
I know you can delete the line from 70 to 72 - but why is the old name somewhere?

2) Is it possible to set the sort alphabetically from A to Z?
- Today is a strange, unless the date of constitution?

Thank you.
(2012-11-15, 03:43:35)PiN Wrote: [ rel="nofollow" rel="nofollow" -> ]1) I have a question where SiteMap gets outdated names of the parties?
- Change in the admin, the site is new and in the sitemap are old.
I know you can delete the line from 70 to 72 - but why is the old name somewhere?

Because it gets it from the "menu text" field of pages. If you change a page title but don't edit the "menu text" (hidden in Edit page -> Options -> Add to menu), it remains the old page name.

(2012-11-15, 03:43:35)PiN Wrote: [ rel="nofollow" rel="nofollow" -> ]2) Is it possible to set the sort alphabetically from A to Z?
- Today is a strange, unless the date of constitution?

It seems to sort by menu priority (also in Edit page -> Options -> ...).

To make it sort by page title, you need to do some changes to the plugin's code.
Only those pages which is in all their old titles have been added to the menu.

What changes could be made to sort alphabetically?

Regards,
(2012-11-15, 06:21:53)PiN Wrote: [ rel="nofollow" rel="nofollow" -> ]Only those pages which is in all their old titles have been added to the menu.

GS fills the menu text for every page, even if you haven't added it to the menu.

(2012-11-15, 06:21:53)PiN Wrote: [ rel="nofollow" rel="nofollow" -> ]What changes could be made to sort alphabetically?

Here's a quick patch (will not work with GS 3.0 or older)

Edit sitemap.php line 68, remove this:
Code:
$pages[$slug]['order'] = intval($data->menuOrder);

and insert this instead:

Code:
$pages[$slug]['order'] = ($data->parent != '') ? strtolower(returnPageField($data->parent,'title')) : '';
$pages[$slug]['order'] .= strtolower(cl($data->title));

(will not work with GS 3.0 or older)
Carlos, Thanks a lot for your help. Of course it works. Regards,
The ordering seems to be random for the site map? Is that right?

Many thanks.
@lukastaylor See previous posts in this thread.
Is it possible to use this plugin on multilanguage website too???

like "sitemap=lang" parameters ?

Currently it shows all pages if i have ML website with "DE / EN etc"

Hope somebody can help me.
for site maps using I18N, see here:
http://mvlcek.bplaced.net/get-simple/mul...navigation
To display a site map with all pages:
...
Hi Carlos,
I'm so glad you're improving and updating this plugin too. You do always a great work!
Let me suggest a modification: This plugin shows the site map too, and this thing is not very professional...

So I want to share this small trick: Name your sitemap page "sitemap", then in "sitemap.php" look for the line

PHP Code:
if ($data->private != 'Y') { 

and change it in this way

PHP Code:
if (($data->private != 'Y') && ($data->url != 'sitemap')) { 

In this way, the sitemap won't show itself anymore.
Thank you, but I've never updated this plugin. I just posted some patches here long ago.
And why we don't updated it? GetSimplers need it
I already made it I want your authorization :-P

(2014-01-21, 00:38:22)Carlos Wrote: [ rel="nofollow" -> ]Thank you, but I've never updated this plugin. I just posted some patches here long ago.
Pages: 1 2