<?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 – Navigate articles by custom field</title>
 <description>Navigate articles by custom field - comments</description>
 <link>https://textpattern.tips/navigate-articles-by-custom-field</link>
 <atom:link href="https://textpattern.tips/navigate-articles-by-custom-field?f=comment-feed" rel="self" type="application/rss+xml" />
 <pubDate>Fri, 09 Nov 12 11:33:00 +0000</pubDate>

 <item>
     <title>Comment on Navigate articles by custom field by Edward</title>
     <link><a href="https://textpattern.tips/navigate-articles-by-custom-field#c001161" id="c001161">1</a></link>
     <guid><a href="https://textpattern.tips/navigate-articles-by-custom-field#c001161" id="c001161">1</a></guid>
     <pubDate>Wed, 07 Nov 12 10:12:13 +0000</pubDate>
     <description><![CDATA[<p>Thanks for this! </p><p>Going a little further, I am using this as my main navigation, so how would I set the class to &#8220;active&#8221; ?</p><p>Something along these lines i guess :</p><p><code>&lt;txp:article_custom limit=&quot;8&quot; wraptag=&quot;ul&quot; break=&quot;&quot;&gt;
 &lt;li&lt;some_if_statement&gt; class=&quot;active&quot;&lt;/end_if_statement&gt;&gt;&lt;a href='&lt;txp:permlink /&gt;'&gt;&lt;txp:title /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/txp:article_custom&gt;</code></p><p>But I am struggling to find the right if statement&#8230;</p><p>Any ideas?</p>]]></description>
     <content:encoded><![CDATA[<p>Thanks for this! </p><p>Going a little further, I am using this as my main navigation, so how would I set the class to &#8220;active&#8221; ?</p><p>Something along these lines i guess :</p><p><code>&lt;txp:article_custom limit=&quot;8&quot; wraptag=&quot;ul&quot; break=&quot;&quot;&gt;
 &lt;li&lt;some_if_statement&gt; class=&quot;active&quot;&lt;/end_if_statement&gt;&gt;&lt;a href='&lt;txp:permlink /&gt;'&gt;&lt;txp:title /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/txp:article_custom&gt;</code></p><p>But I am struggling to find the right if statement&#8230;</p><p>Any ideas?</p>]]></content:encoded>
     <dc:creator>Edward</dc:creator>
 
</item>
<item>
     <title>Comment on Navigate articles by custom field by etc</title>
     <link><a href="https://textpattern.tips/navigate-articles-by-custom-field#c001162" id="c001162">1</a></link>
     <guid><a href="https://textpattern.tips/navigate-articles-by-custom-field#c001162" id="c001162">1</a></guid>
     <pubDate>Fri, 09 Nov 12 11:33:00 +0000</pubDate>
     <description><![CDATA[<p>Hi Edward,</p><p>if I get it right, you want to make &#8220;active&#8221; the current article class? You could do it like this:</p><pre><code>&lt;txp:etc_query wraptag=&quot;ul&quot;
 data='&lt;txp:article_custom limit=&quot;100&quot; album=''&lt;txp:custom_field name=&quot;album&quot; /&gt;''&gt;
   &lt;a href=''&lt;txp:permlink /&gt;''&gt;&lt;txp:title /&gt;&lt;/a&gt;
 &lt;/txp:article_custom&gt;'
 query='a[@href=''&lt;txp:permlink /&gt;'']'&gt;
    &lt;li&gt;{preceding-sibling::a[1]}&lt;/li&gt;
    &lt;li class=&quot;active&quot;&gt;{.}&lt;/li&gt;
    &lt;li&gt;{following-sibling::a[1]}&lt;/li&gt;
&lt;/txp:etc_query&gt;
</code></pre><p>This will output something like</p><pre><code>&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;...&quot;&gt;[previous]&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;active&quot;&gt;&lt;a href=&quot;...&quot;&gt;[current]&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;...&quot;&gt;[next]&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</code></pre>]]></description>
     <content:encoded><![CDATA[<p>Hi Edward,</p><p>if I get it right, you want to make &#8220;active&#8221; the current article class? You could do it like this:</p><pre><code>&lt;txp:etc_query wraptag=&quot;ul&quot;
 data='&lt;txp:article_custom limit=&quot;100&quot; album=''&lt;txp:custom_field name=&quot;album&quot; /&gt;''&gt;
   &lt;a href=''&lt;txp:permlink /&gt;''&gt;&lt;txp:title /&gt;&lt;/a&gt;
 &lt;/txp:article_custom&gt;'
 query='a[@href=''&lt;txp:permlink /&gt;'']'&gt;
    &lt;li&gt;{preceding-sibling::a[1]}&lt;/li&gt;
    &lt;li class=&quot;active&quot;&gt;{.}&lt;/li&gt;
    &lt;li&gt;{following-sibling::a[1]}&lt;/li&gt;
&lt;/txp:etc_query&gt;
</code></pre><p>This will output something like</p><pre><code>&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;...&quot;&gt;[previous]&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;active&quot;&gt;&lt;a href=&quot;...&quot;&gt;[current]&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;...&quot;&gt;[next]&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</code></pre>]]></content:encoded>
     <dc:creator><a rel="nofollow" href="http://www.iut-fbleau.fr/projet/etc/">etc</a></dc:creator>
 
</item>

</channel>
</rss>