Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
I18N Sitemap ?
#1
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?
Reply
#2
(2013-10-13, 08:01:17)phpman Wrote: 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.
--
Nick.
Reply
#3
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?
Reply
#4
(2013-10-13, 18:45:34)phpman Wrote: ... 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.
--
Nick.
Reply




Users browsing this thread: 1 Guest(s)