<?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 – Display the first image from a list in the article image field</title>
 <description>Display the first image from a list in the article image field - comments</description>
 <link>https://textpattern.tips/display-the-first-image-from-a-list-in-the-article-image-field</link>
 <atom:link href="https://textpattern.tips/display-the-first-image-from-a-list-in-the-article-image-field?f=comment-feed" rel="self" type="application/rss+xml" />
 <pubDate>Sat, 19 Mar 11 01:39:48 +0000</pubDate>

 <item>
     <title>Comment on Display the first image from a list in the article image field by Nora Brown</title>
     <link><a href="https://textpattern.tips/display-the-first-image-from-a-list-in-the-article-image-field#c000883" id="c000883">1</a></link>
     <guid><a href="https://textpattern.tips/display-the-first-image-from-a-list-in-the-article-image-field#c000883" id="c000883">1</a></guid>
     <pubDate>Fri, 04 Mar 11 14:19:12 +0000</pubDate>
     <description><![CDATA[<p>This is really handy &#8212; just to get the images to display in the order you&#8217;ve specified them in the <code>article_image</code> field. But don&#8217;t you need <code>limit="1"</code> on the <code>&lt;txp:images /&gt;</code> tag, to get it to display only the first image?</p><p>And I <strong>think</strong>, in your particular example, since the ID&#8217;s you listed are actually in numerical order, you could sort by ID and be okay. The trouble would arise if you wanted 1,2,3,31,12,10 &#8212; right?</p>]]></description>
     <content:encoded><![CDATA[<p>This is really handy &#8212; just to get the images to display in the order you&#8217;ve specified them in the <code>article_image</code> field. But don&#8217;t you need <code>limit="1"</code> on the <code>&lt;txp:images /&gt;</code> tag, to get it to display only the first image?</p><p>And I <strong>think</strong>, in your particular example, since the ID&#8217;s you listed are actually in numerical order, you could sort by ID and be okay. The trouble would arise if you wanted 1,2,3,31,12,10 &#8212; right?</p>]]></content:encoded>
     <dc:creator><a rel="nofollow" href="http://www.norabrowndesign.com">Nora Brown</a></dc:creator>
 
</item>
<item>
     <title>Comment on Display the first image from a list in the article image field by Joe Hastings</title>
     <link><a href="https://textpattern.tips/display-the-first-image-from-a-list-in-the-article-image-field#c000884" id="c000884">1</a></link>
     <guid><a href="https://textpattern.tips/display-the-first-image-from-a-list-in-the-article-image-field#c000884" id="c000884">1</a></guid>
     <pubDate>Fri, 04 Mar 11 15:07:59 +0000</pubDate>
     <description><![CDATA[<p>Good tip, thanks Jonathan and Stef. I had been achieving the same result until now by using a single article image to illustrate the list and an image category to define the array of  images (gallery) in the article. This is neater, I think.</p>]]></description>
     <content:encoded><![CDATA[<p>Good tip, thanks Jonathan and Stef. I had been achieving the same result until now by using a single article image to illustrate the list and an image category to define the array of  images (gallery) in the article. This is neater, I think.</p>]]></content:encoded>
     <dc:creator>Joe Hastings</dc:creator>
 
</item>
<item>
     <title>Comment on Display the first image from a list in the article image field by Jeff Soo</title>
     <link><a href="https://textpattern.tips/display-the-first-image-from-a-list-in-the-article-image-field#c000885" id="c000885">1</a></link>
     <guid><a href="https://textpattern.tips/display-the-first-image-from-a-list-in-the-article-image-field#c000885" id="c000885">1</a></guid>
     <pubDate>Fri, 04 Mar 11 15:42:45 +0000</pubDate>
     <description><![CDATA[<p>If all you want is the first image, <code>article_image</code> will do that (as of Txp 4.3.0).</p>]]></description>
     <content:encoded><![CDATA[<p>If all you want is the first image, <code>article_image</code> will do that (as of Txp 4.3.0).</p>]]></content:encoded>
     <dc:creator><a rel="nofollow" href="http://ipsedixit.net">Jeff Soo</a></dc:creator>
 
</item>
<item>
     <title>Comment on Display the first image from a list in the article image field by Jonathan Stubbs</title>
     <link><a href="https://textpattern.tips/display-the-first-image-from-a-list-in-the-article-image-field#c000886" id="c000886">1</a></link>
     <guid><a href="https://textpattern.tips/display-the-first-image-from-a-list-in-the-article-image-field#c000886" id="c000886">1</a></guid>
     <pubDate>Sat, 05 Mar 11 12:18:44 +0000</pubDate>
     <description><![CDATA[<p>Nora - yes, @limit=&#8220;1&#8221;@ would probably be a good idea but it works anyway without the attribute. We could sort by ID but in this case the client wanted to be able to choose the image that displays on the list page, so the easiest way to do that is to pick the first image in the list. </p><p>In this project, the client places all the images in order of appearance in the article image field. On the individual page this results in a Galleriffic image gallery, otherwise one image is displayed in the overall portfolio.</p><p>@Joe &#8211; yes, this is much neater and no use of plugins at all. I&#8217;ll post the code and <span class="caps">URL</span> when the site goes live.</p><p>@Jeff &#8211; no it won&#8217;t, because in each entry to the Portfolio section there is always a list of images and we need to display the first image listed in the field.</p>]]></description>
     <content:encoded><![CDATA[<p>Nora - yes, @limit=&#8220;1&#8221;@ would probably be a good idea but it works anyway without the attribute. We could sort by ID but in this case the client wanted to be able to choose the image that displays on the list page, so the easiest way to do that is to pick the first image in the list. </p><p>In this project, the client places all the images in order of appearance in the article image field. On the individual page this results in a Galleriffic image gallery, otherwise one image is displayed in the overall portfolio.</p><p>@Joe &#8211; yes, this is much neater and no use of plugins at all. I&#8217;ll post the code and <span class="caps">URL</span> when the site goes live.</p><p>@Jeff &#8211; no it won&#8217;t, because in each entry to the Portfolio section there is always a list of images and we need to display the first image listed in the field.</p>]]></content:encoded>
     <dc:creator><a rel="nofollow" href="http://jonathanstubbs.com">Jonathan Stubbs</a></dc:creator>
 
</item>
<item>
     <title>Comment on Display the first image from a list in the article image field by Nora Brown</title>
     <link><a href="https://textpattern.tips/display-the-first-image-from-a-list-in-the-article-image-field#c000895" id="c000895">1</a></link>
     <guid><a href="https://textpattern.tips/display-the-first-image-from-a-list-in-the-article-image-field#c000895" id="c000895">1</a></guid>
     <pubDate>Fri, 18 Mar 11 17:36:16 +0000</pubDate>
     <description><![CDATA[<p>Interesting! Does it work (output only a single image) because <code>field(`ID`,&lt;txp:custom_field name="article_image" /&gt;)</code> only ouputs the first ID?</p>]]></description>
     <content:encoded><![CDATA[<p>Interesting! Does it work (output only a single image) because <code>field(`ID`,&lt;txp:custom_field name="article_image" /&gt;)</code> only ouputs the first ID?</p>]]></content:encoded>
     <dc:creator><a rel="nofollow" href="http://www.norabrowndesign.com">Nora Brown</a></dc:creator>
 
</item>
<item>
     <title>Comment on Display the first image from a list in the article image field by Jonathan Stubbs</title>
     <link><a href="https://textpattern.tips/display-the-first-image-from-a-list-in-the-article-image-field#c000896" id="c000896">1</a></link>
     <guid><a href="https://textpattern.tips/display-the-first-image-from-a-list-in-the-article-image-field#c000896" id="c000896">1</a></guid>
     <pubDate>Sat, 19 Mar 11 01:39:48 +0000</pubDate>
     <description><![CDATA[<p>Without looking at the code itself, that would be my guess. It would be good practice though to add a <code>limit="1"</code> to the <code>&lt;txp:images&gt;...&lt;/txp:images&gt;</code> container tag.</p>]]></description>
     <content:encoded><![CDATA[<p>Without looking at the code itself, that would be my guess. It would be good practice though to add a <code>limit="1"</code> to the <code>&lt;txp:images&gt;...&lt;/txp:images&gt;</code> container tag.</p>]]></content:encoded>
     <dc:creator><a rel="nofollow" href="http://jonathanstubbs.com">Jonathan Stubbs</a></dc:creator>
 
</item>

</channel>
</rss>