GetSimple Support Forum

Full Version: I18N Sitemap ?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I read that it is possibe to create a sitemap with I18N but i can not
find informations what i must do to get a sitemap to implement it into
a sampe page or into the template.

Anyone can help?
(2013-10-13, 08:01:17)phpman Wrote: [ rel="nofollow" -> ]I read that it is possibe to create a sitemap with I18N but i can not
find informations what i must do to get a sitemap to implement it into
a sampe page or into the template.

My method (not original, but I don't remember where it came from) to put a Sitemap on a page:

Component 'sitemap':
PHP Code:
<?php
echo '<div id="sitemap"><ul>';
get_i18n_navigation(return_page_slug(),0,99,I18N_SHOW_PAGES);
echo 
'</ul></div>';
?>

On the page:
Code:
{% sitemap %}

Depends on plugins: I18N Search, DynPages.

I use CSS on the Sitemap page to hide the Sitemap and the custom 404 page in the list.
hmm... i´ve test this but it dosn´t work if i create a component like this.

Problem i think is that the component normaly shown by the following tag only:

Code:
<?php get_component('sitemap'); ?>

and i can´t use {sitemap} as a slug in the content pages.

Did you have reference site who i can shown the result of your work?
(2013-10-13, 18:45:34)phpman Wrote: [ rel="nofollow" -> ]... and i can´t use {sitemap} as a slug in the content pages.

Read what I said:
Quote:Depends on plugins: I18N Search, DynPages.

DynPages is necessary to call a component directly from the page editor.

Or, you put directly in the template:
PHP Code:
<div class="sitemap"><ul>
get_i18n_navigation(return_page_slug(),0,99,I18N_SHOW_PAGES);
</
ul></div

You must wrap the PHP in <ul> ... </ul>. The <div class="sitemap"> ... </div> is convenient for styling, but not essential.