An adhoc adventure into web design and development

Referring to Textpattern Forum post Textpattern sitemap?

and copying vickilh post with Els editing:-

1. Created a form called Sitemap:

<li><txp:permlink><txp:title /></txp:permlink> (<txp:section />)</li>

2. Created a new template called Sitemap, which I added this:

<ul><txp:article_custom limit="9999" form="sitemap" sort="section asc" /></ul>

gives a sitemap like so

Search engines like sitemaps, it helps their spiders to explore the sites links,
and anything that helps a search engine helps a site climb a little higher up the search results.

Now interestingly vivkilh asks the question “Can I have it head up each section with the Section name link, followed by all the categories in that section?”

To which Els replies:-

Yes, you can use txp:if_different (….) to do that:

On the page:
<ul><txp:article_custom limit="9999" form="sitemap" sort="section asc" /></ul>

Which gives

Your form:
<txp:if_different></ul> <h3><txp:section link="1" title="1" /></h3> <ul></txp:if_different>

  • Creating a sitemap in Textpattern