<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
 <generator>http://textpattern.com/</generator>
 <title>Textpattern Tips – Create an archive or sitemap page by section</title>
 <description>Create an archive or sitemap page by section - comments</description>
 <link>https://textpattern.tips/create-an-archive-or-sitemap-page-by-section</link>
 <atom:link href="https://textpattern.tips/create-an-archive-or-sitemap-page-by-section?f=comment-feed" rel="self" type="application/rss+xml" />
 <pubDate>Wed, 13 Oct 10 04:28:50 +0000</pubDate>

 <item>
     <title>Comment on Create an archive or sitemap page by section by Els</title>
     <link><a href="https://textpattern.tips/create-an-archive-or-sitemap-page-by-section#c000095" id="c000095">1</a></link>
     <guid><a href="https://textpattern.tips/create-an-archive-or-sitemap-page-by-section#c000095" id="c000095">1</a></guid>
     <pubDate>Sat, 14 Feb 09 12:22:46 +0000</pubDate>
     <description><![CDATA[<p>Just a side note: of course this code doesn&#8217;t <em>have to</em> be inside an article, you can just as well put it in the page template.</p>]]></description>
     <content:encoded><![CDATA[<p>Just a side note: of course this code doesn&#8217;t <em>have to</em> be inside an article, you can just as well put it in the page template.</p>]]></content:encoded>
     <dc:creator>Els</dc:creator>
 
</item>
<item>
     <title>Comment on Create an archive or sitemap page by section by Jonathan Stubbs</title>
     <link><a href="https://textpattern.tips/create-an-archive-or-sitemap-page-by-section#c000096" id="c000096">1</a></link>
     <guid><a href="https://textpattern.tips/create-an-archive-or-sitemap-page-by-section#c000096" id="c000096">1</a></guid>
     <pubDate>Sat, 14 Feb 09 13:40:18 +0000</pubDate>
     <description><![CDATA[<p>Els, I thought I had mentioned that the code could be placed in a page template, but I placed that comment in the next <span class="caps">TXP</span> Tip instead &#8211; mea culpa! ;-)</p>]]></description>
     <content:encoded><![CDATA[<p>Els, I thought I had mentioned that the code could be placed in a page template, but I placed that comment in the next <span class="caps">TXP</span> Tip instead &#8211; mea culpa! ;-)</p>]]></content:encoded>
     <dc:creator><a rel="nofollow" href="http://jonathanstubbs.com">Jonathan Stubbs</a></dc:creator>
 
</item>
<item>
     <title>Comment on Create an archive or sitemap page by section by Luis</title>
     <link><a href="https://textpattern.tips/create-an-archive-or-sitemap-page-by-section#c000097" id="c000097">1</a></link>
     <guid><a href="https://textpattern.tips/create-an-archive-or-sitemap-page-by-section#c000097" id="c000097">1</a></guid>
     <pubDate>Sun, 15 Feb 09 16:29:06 +0000</pubDate>
     <description><![CDATA[<p>Great tip!, I was about to start working on an Archive page when I found this. Thnks!</p>]]></description>
     <content:encoded><![CDATA[<p>Great tip!, I was about to start working on an Archive page when I found this. Thnks!</p>]]></content:encoded>
     <dc:creator><a rel="nofollow" href="http://armatoste.net">Luis</a></dc:creator>
 
</item>
<item>
     <title>Comment on Create an archive or sitemap page by section by Kevin Potts</title>
     <link><a href="https://textpattern.tips/create-an-archive-or-sitemap-page-by-section#c000098" id="c000098">1</a></link>
     <guid><a href="https://textpattern.tips/create-an-archive-or-sitemap-page-by-section#c000098" id="c000098">1</a></guid>
     <pubDate>Tue, 17 Feb 09 03:00:39 +0000</pubDate>
     <description><![CDATA[<p>Nice use of variables. Trying to wrap my head around the logic you wrote, but I&#8217;ll try it eventually.</p>]]></description>
     <content:encoded><![CDATA[<p>Nice use of variables. Trying to wrap my head around the logic you wrote, but I&#8217;ll try it eventually.</p>]]></content:encoded>
     <dc:creator><a rel="nofollow" href="http://www.graphicpush.com">Kevin Potts</a></dc:creator>
 
</item>
<item>
     <title>Comment on Create an archive or sitemap page by section by Marie Poulin</title>
     <link><a href="https://textpattern.tips/create-an-archive-or-sitemap-page-by-section#c000444" id="c000444">1</a></link>
     <guid><a href="https://textpattern.tips/create-an-archive-or-sitemap-page-by-section#c000444" id="c000444">1</a></guid>
     <pubDate>Thu, 19 Mar 09 18:52:45 +0000</pubDate>
     <description><![CDATA[<p>Hello, I tried using this on a page i was working on, but couldn't quite get it to work how i needed it to… so i tweaked it a bit, and seems to work how i want now. I created a section list that looks like this:</p>
<pre><code>&lt;txp:section_list class="subnav" wraptag="ul" break="" form="navbuild" sections="identity, stationery, invitations, brochures, advertisting, websites, jewelry" active_class="active" /&gt;</pre></code>
<p>then in the form navbuild, i put this:</p>
<pre><code>&lt;!-- check if there are any articles in this section --&gt;
&lt;txp:variable name="hasarticle" value='&lt;txp:article_custom section='‘&lt;txp:section /&gt;'‘ limit="1" /&gt;' /&gt;
&lt;txp:if_variable name="hasarticle" value=""&gt;
    &lt;!-- no articles, don't display the section --&gt;
&lt;txp:else /&gt;
    &lt;!-- check if more than one article in this section --&gt;
    &lt;txp:variable name="morethanone" value='&lt;txp:article_custom section='‘&lt;txp:section /&gt;'‘ offset="1" limit="1" form="navbuildlink"/&gt;' /&gt;
    &lt;txp:if_variable name="morethanone" value=""&gt;
        &lt;!-- only one article in this section, only display linked section page --&gt;
        &lt;li&lt;txp:if_section name='&lt;txp:section /&gt;'&gt; class="active"&lt;/txp:if_section&gt;&gt;
            &lt;txp:section link="1" title="1" /&gt;
        &lt;/li&gt;
    &lt;txp:else /&gt;
        &lt;txp:if_different&gt;
            &lt;li&lt;txp:if_section name='&lt;txp:section /&gt;'&gt; class="active"&lt;/txp:if_section&gt;&gt;
                &lt;txp:section link="1" title="1" /&gt;
            &lt;/li&gt;
        &lt;/txp:if_different&gt;
        &lt;txp:if_section name='&lt;txp:section /&gt;'&gt;
            &lt;txp:article_custom section='&lt;txp:section /&gt;' form="navbuildlink" wraptag="ul" class="subnav" /&gt;
        &lt;/txp:if_section&gt;
        &lt;/txp:if_article_list&gt;
    &lt;/txp:if_variable&gt;
&lt;/txp:if_variable&gt;</pre></code>
<p>Not sure if i missed something, or if there is an easier way to do this.</p>]]></description>
     <content:encoded><![CDATA[<p>Hello, I tried using this on a page i was working on, but couldn't quite get it to work how i needed it to… so i tweaked it a bit, and seems to work how i want now. I created a section list that looks like this:</p>
<pre><code>&lt;txp:section_list class="subnav" wraptag="ul" break="" form="navbuild" sections="identity, stationery, invitations, brochures, advertisting, websites, jewelry" active_class="active" /&gt;</pre></code>
<p>then in the form navbuild, i put this:</p>
<pre><code>&lt;!-- check if there are any articles in this section --&gt;
&lt;txp:variable name="hasarticle" value='&lt;txp:article_custom section='‘&lt;txp:section /&gt;'‘ limit="1" /&gt;' /&gt;
&lt;txp:if_variable name="hasarticle" value=""&gt;
    &lt;!-- no articles, don't display the section --&gt;
&lt;txp:else /&gt;
    &lt;!-- check if more than one article in this section --&gt;
    &lt;txp:variable name="morethanone" value='&lt;txp:article_custom section='‘&lt;txp:section /&gt;'‘ offset="1" limit="1" form="navbuildlink"/&gt;' /&gt;
    &lt;txp:if_variable name="morethanone" value=""&gt;
        &lt;!-- only one article in this section, only display linked section page --&gt;
        &lt;li&lt;txp:if_section name='&lt;txp:section /&gt;'&gt; class="active"&lt;/txp:if_section&gt;&gt;
            &lt;txp:section link="1" title="1" /&gt;
        &lt;/li&gt;
    &lt;txp:else /&gt;
        &lt;txp:if_different&gt;
            &lt;li&lt;txp:if_section name='&lt;txp:section /&gt;'&gt; class="active"&lt;/txp:if_section&gt;&gt;
                &lt;txp:section link="1" title="1" /&gt;
            &lt;/li&gt;
        &lt;/txp:if_different&gt;
        &lt;txp:if_section name='&lt;txp:section /&gt;'&gt;
            &lt;txp:article_custom section='&lt;txp:section /&gt;' form="navbuildlink" wraptag="ul" class="subnav" /&gt;
        &lt;/txp:if_section&gt;
        &lt;/txp:if_article_list&gt;
    &lt;/txp:if_variable&gt;
&lt;/txp:if_variable&gt;</pre></code>
<p>Not sure if i missed something, or if there is an easier way to do this.</p>]]></content:encoded>
     <dc:creator><a rel="nofollow" href="http://www.mariepoulin.com">Marie Poulin</a></dc:creator>
 
</item>
<item>
     <title>Comment on Create an archive or sitemap page by section by Tom Beech</title>
     <link><a href="https://textpattern.tips/create-an-archive-or-sitemap-page-by-section#c000717" id="c000717">1</a></link>
     <guid><a href="https://textpattern.tips/create-an-archive-or-sitemap-page-by-section#c000717" id="c000717">1</a></guid>
     <pubDate>Thu, 20 May 10 11:20:51 +0000</pubDate>
     <description><![CDATA[<p>This is great and exactly what I needed for my on page sitemap. Is there any way that this could be altered to include sticky articles as well. At the moment it only seems to display live articles and their sections.</p>]]></description>
     <content:encoded><![CDATA[<p>This is great and exactly what I needed for my on page sitemap. Is there any way that this could be altered to include sticky articles as well. At the moment it only seems to display live articles and their sections.</p>]]></content:encoded>
     <dc:creator>Tom Beech</dc:creator>
 
</item>
<item>
     <title>Comment on Create an archive or sitemap page by section by Mischa van der Spek</title>
     <link><a href="https://textpattern.tips/create-an-archive-or-sitemap-page-by-section#c000795" id="c000795">1</a></link>
     <guid><a href="https://textpattern.tips/create-an-archive-or-sitemap-page-by-section#c000795" id="c000795">1</a></guid>
     <pubDate>Tue, 05 Oct 10 13:31:42 +0000</pubDate>
     <description><![CDATA[<p>Hi Els,</p><p>As Tom Beech said, dynamic static articles would make it perfect! </p><p>At the moment I manually added them by reproducing the &#8216;Home&#8217; li tag and changing their names&#8230;</p>]]></description>
     <content:encoded><![CDATA[<p>Hi Els,</p><p>As Tom Beech said, dynamic static articles would make it perfect! </p><p>At the moment I manually added them by reproducing the &#8216;Home&#8217; li tag and changing their names&#8230;</p>]]></content:encoded>
     <dc:creator><a rel="nofollow" href="http://www.mischavanderspek.com">Mischa van der Spek</a></dc:creator>
 
</item>
<item>
     <title>Comment on Create an archive or sitemap page by section by Mischa van der Spek</title>
     <link><a href="https://textpattern.tips/create-an-archive-or-sitemap-page-by-section#c000796" id="c000796">1</a></link>
     <guid><a href="https://textpattern.tips/create-an-archive-or-sitemap-page-by-section#c000796" id="c000796">1</a></guid>
     <pubDate>Tue, 05 Oct 10 13:41:47 +0000</pubDate>
     <description><![CDATA[<p>Of course using an <code>a href</code>-tag to show the static articles.</p>]]></description>
     <content:encoded><![CDATA[<p>Of course using an <code>a href</code>-tag to show the static articles.</p>]]></content:encoded>
     <dc:creator><a rel="nofollow" href="http://www.mischavanderspek.com">Mischa van der Spek</a></dc:creator>
 
</item>
<item>
     <title>Comment on Create an archive or sitemap page by section by Els</title>
     <link><a href="https://textpattern.tips/create-an-archive-or-sitemap-page-by-section#c000800" id="c000800">1</a></link>
     <guid><a href="https://textpattern.tips/create-an-archive-or-sitemap-page-by-section#c000800" id="c000800">1</a></guid>
     <pubDate>Tue, 12 Oct 10 17:25:07 +0000</pubDate>
     <description><![CDATA[<p>Tom and Mischa, sorry, only just noticed your comments. I&#8217;ll see if I can post some code for including sticky articles soon.</p><p>All, there is a link to my sitemap page in this article. Sorry, it doesn&#8217;t exist anymore. Another sitemap using this code can be found <a href="http://www.arlettejeanine.com/en/sitemap/" rel="nofollow">here</a>.</p>]]></description>
     <content:encoded><![CDATA[<p>Tom and Mischa, sorry, only just noticed your comments. I&#8217;ll see if I can post some code for including sticky articles soon.</p><p>All, there is a link to my sitemap page in this article. Sorry, it doesn&#8217;t exist anymore. Another sitemap using this code can be found <a href="http://www.arlettejeanine.com/en/sitemap/" rel="nofollow">here</a>.</p>]]></content:encoded>
     <dc:creator>Els</dc:creator>
 
</item>
<item>
     <title>Comment on Create an archive or sitemap page by section by Jonathan Stubbs</title>
     <link><a href="https://textpattern.tips/create-an-archive-or-sitemap-page-by-section#c000802" id="c000802">1</a></link>
     <guid><a href="https://textpattern.tips/create-an-archive-or-sitemap-page-by-section#c000802" id="c000802">1</a></guid>
     <pubDate>Wed, 13 Oct 10 04:28:50 +0000</pubDate>
     <description><![CDATA[<p>Els &#8211; I fixed the link to the sitemap in this article &#8230; thanks!</p>]]></description>
     <content:encoded><![CDATA[<p>Els &#8211; I fixed the link to the sitemap in this article &#8230; thanks!</p>]]></content:encoded>
     <dc:creator><a rel="nofollow" href="http://jonathanstubbs.com">Jonathan Stubbs</a></dc:creator>
 
</item>

</channel>
</rss>