<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: A simpler way to view attachments in Confluence</title>
	<atom:link href="http://davidsimpson.me/2009/10/16/a-simpler-way-to-view-attachments-in-confluence/feed/" rel="self" type="application/rss+xml" />
	<link>http://davidsimpson.me/2009/10/16/a-simpler-way-to-view-attachments-in-confluence/</link>
	<description>Developing the web, one page at a time.</description>
	<lastBuildDate>Thu, 17 May 2012 10:19:34 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
	<item>
		<title>By: Tim</title>
		<link>http://davidsimpson.me/2009/10/16/a-simpler-way-to-view-attachments-in-confluence/#comment-1068</link>
		<dc:creator>Tim</dc:creator>
		<pubDate>Thu, 05 Jan 2012 22:13:59 +0000</pubDate>
		<guid isPermaLink="false">http://davidsimpson.me/?p=367#comment-1068</guid>
		<description>Thanks for this, its working nicely for me.</description>
		<content:encoded><![CDATA[<p>Thanks for this, its working nicely for me.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David</title>
		<link>http://davidsimpson.me/2009/10/16/a-simpler-way-to-view-attachments-in-confluence/#comment-192</link>
		<dc:creator>David</dc:creator>
		<pubDate>Wed, 16 Mar 2011 21:47:44 +0000</pubDate>
		<guid isPermaLink="false">http://davidsimpson.me/?p=367#comment-192</guid>
		<description>I&#039;ve updated this macro a little. Please review the change.  

Thanks, David</description>
		<content:encoded><![CDATA[<p>I&#8217;ve updated this macro a little. Please review the change.  </p>
<p>Thanks, David</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel</title>
		<link>http://davidsimpson.me/2009/10/16/a-simpler-way-to-view-attachments-in-confluence/#comment-131</link>
		<dc:creator>Daniel</dc:creator>
		<pubDate>Fri, 18 Feb 2011 08:09:32 +0000</pubDate>
		<guid isPermaLink="false">http://davidsimpson.me/?p=367#comment-131</guid>
		<description>This macro is beautiful.
But when I implement it in a page, there is always this line written before the macro is displayed:

$helper.page.title

and it is ticketed as a page.

What can I do to hide this line?</description>
		<content:encoded><![CDATA[<p>This macro is beautiful.<br />
But when I implement it in a page, there is always this line written before the macro is displayed:</p>
<p>$helper.page.title</p>
<p>and it is ticketed as a page.</p>
<p>What can I do to hide this line?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eric R.</title>
		<link>http://davidsimpson.me/2009/10/16/a-simpler-way-to-view-attachments-in-confluence/#comment-130</link>
		<dc:creator>Eric R.</dc:creator>
		<pubDate>Sun, 06 Feb 2011 19:51:34 +0000</pubDate>
		<guid isPermaLink="false">http://davidsimpson.me/?p=367#comment-130</guid>
		<description>In confluence 3.4.7 this is returning 
Error formatting macro: list-attachments: com.atlassian.core.exception.InfrastructureException: Error occurred rendering template content

Any ideas?</description>
		<content:encoded><![CDATA[<p>In confluence 3.4.7 this is returning<br />
Error formatting macro: list-attachments: com.atlassian.core.exception.InfrastructureException: Error occurred rendering template content</p>
<p>Any ideas?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David</title>
		<link>http://davidsimpson.me/2009/10/16/a-simpler-way-to-view-attachments-in-confluence/#comment-129</link>
		<dc:creator>David</dc:creator>
		<pubDate>Wed, 15 Dec 2010 00:31:45 +0000</pubDate>
		<guid isPermaLink="false">http://davidsimpson.me/?p=367#comment-129</guid>
		<description>This doesn&#039;t sort alphabetically.  You could perhaps do some client side processing using javascript/jQuery e.g.
&lt;code&gt;
/**
 * Quick &amp; dirty alphanumeric sorter
 *
 */
(function($) {
	$.fn.azSort = function ()
	{
		$(this).each(function(){
			me = this; 

			// Sort the list items
			var listItems = $(me).children(&#039;li&#039;).get();
			listItems.sort(function(x,y) {
				var compareX = $(x).text().toUpperCase();
				var compareY = $(y).text().toUpperCase();
				return (compareX &lt; compareY) ? -1 : (compareX &gt; compareY) ? 1 : 0;
			});
		
			// Write the list items back to the DOM
			$(me).append(listItems);
		});
	}
})(jQuery);

AJS.init(function(){
	AJS.$(&#039;.listAttachmentsDiv ul&#039;).azSort();
});&lt;/code&gt;

NB This code is untested, but  a good starting point.</description>
		<content:encoded><![CDATA[<p>This doesn&#8217;t sort alphabetically.  You could perhaps do some client side processing using javascript/jQuery e.g.<br />
<code><br />
/**<br />
 * Quick &#038; dirty alphanumeric sorter<br />
 *<br />
 */<br />
(function($) {<br />
	$.fn.azSort = function ()<br />
	{<br />
		$(this).each(function(){<br />
			me = this; </p>
<p>			// Sort the list items<br />
			var listItems = $(me).children('li').get();<br />
			listItems.sort(function(x,y) {<br />
				var compareX = $(x).text().toUpperCase();<br />
				var compareY = $(y).text().toUpperCase();<br />
				return (compareX < compareY) ? -1 : (compareX > compareY) ? 1 : 0;<br />
			});</p>
<p>			// Write the list items back to the DOM<br />
			$(me).append(listItems);<br />
		});<br />
	}<br />
})(jQuery);</p>
<p>AJS.init(function(){<br />
	AJS.$('.listAttachmentsDiv ul').azSort();<br />
});</code></p>
<p>NB This code is untested, but  a good starting point.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sturla</title>
		<link>http://davidsimpson.me/2009/10/16/a-simpler-way-to-view-attachments-in-confluence/#comment-128</link>
		<dc:creator>Sturla</dc:creator>
		<pubDate>Thu, 09 Dec 2010 22:36:55 +0000</pubDate>
		<guid isPermaLink="false">http://davidsimpson.me/?p=367#comment-128</guid>
		<description>I&#039;ve been looking for something like this for a while. But this does unordered lists only? I need to make it in alphabetic order. Is there a way to achieve this?</description>
		<content:encoded><![CDATA[<p>I&#8217;ve been looking for something like this for a while. But this does unordered lists only? I need to make it in alphabetic order. Is there a way to achieve this?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David</title>
		<link>http://davidsimpson.me/2009/10/16/a-simpler-way-to-view-attachments-in-confluence/#comment-127</link>
		<dc:creator>David</dc:creator>
		<pubDate>Sat, 18 Sep 2010 19:06:25 +0000</pubDate>
		<guid isPermaLink="false">http://davidsimpson.me/?p=367#comment-127</guid>
		<description>&lt;strong&gt;Lawrence:&lt;/strong&gt; I&#039;d probably suggest writing a plugin to do this, then do something along these lines...
&lt;ol&gt;
	&lt;li&gt;Get the spaceKey from the current page -- &lt;code&gt;page.getSpaceKey()&lt;/code&gt;. &lt;/li&gt;
	&lt;li&gt;List of all pages in the space&lt;/li&gt;
	&lt;li&gt;Iterate over the pages, listing their attachments  -- &lt;code&gt;page.getAttachments()&lt;/code&gt;&lt;/li&gt;
	&lt;li&gt;Sort the attachments e.g. alphanumerically, or by date, type etc&lt;/li&gt;
&lt;/ol&gt;</description>
		<content:encoded><![CDATA[<p><strong>Lawrence:</strong> I&#8217;d probably suggest writing a plugin to do this, then do something along these lines&#8230;</p>
<ol>
<li>Get the spaceKey from the current page &#8212; <code>page.getSpaceKey()</code>. </li>
<li>List of all pages in the space</li>
<li>Iterate over the pages, listing their attachments  &#8212; <code>page.getAttachments()</code></li>
<li>Sort the attachments e.g. alphanumerically, or by date, type etc</li>
</ol>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lawrence Ong</title>
		<link>http://davidsimpson.me/2009/10/16/a-simpler-way-to-view-attachments-in-confluence/#comment-126</link>
		<dc:creator>Lawrence Ong</dc:creator>
		<pubDate>Fri, 20 Aug 2010 17:47:01 +0000</pubDate>
		<guid isPermaLink="false">http://davidsimpson.me/?p=367#comment-126</guid>
		<description>Hello,

do you know of a way to list all attachments in a space, on a page?

thanks,
Lawrence</description>
		<content:encoded><![CDATA[<p>Hello,</p>
<p>do you know of a way to list all attachments in a space, on a page?</p>
<p>thanks,<br />
Lawrence</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David</title>
		<link>http://davidsimpson.me/2009/10/16/a-simpler-way-to-view-attachments-in-confluence/#comment-125</link>
		<dc:creator>David</dc:creator>
		<pubDate>Thu, 12 Aug 2010 13:43:59 +0000</pubDate>
		<guid isPermaLink="false">http://davidsimpson.me/?p=367#comment-125</guid>
		<description>&lt;b&gt;Deepak:&lt;/b&gt; &lt;a href=&quot;http://docs.atlassian.com/atlassian-confluence/3.3/com/atlassian/confluence/core/ContentEntityObject.html#getLatestVersionsOfAttachments()&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;$content.getLatestVersionsOfAttachments()&lt;/code&gt;&lt;/a&gt; returns a &lt;code&gt;java.util.List&lt;&lt;a href=&quot;http://docs.atlassian.com/atlassian-confluence/3.3/com/atlassian/confluence/pages/Attachment.html&quot; rel=&quot;nofollow&quot;&gt;Attachment&lt;/a&gt;&gt;&lt;/code&gt;.

You need to sort the list of attachments using &lt;code&gt;Attachment.getlastModificationDate()&lt;/code&gt;.

It would be nice to add a sort by parameter to this user macro!</description>
		<content:encoded><![CDATA[<p><b>Deepak:</b> <a href="http://docs.atlassian.com/atlassian-confluence/3.3/com/atlassian/confluence/core/ContentEntityObject.html#getLatestVersionsOfAttachments()" rel="nofollow"><code>$content.getLatestVersionsOfAttachments()</code></a> returns a <code>java.util.List&lt;<a href="http://docs.atlassian.com/atlassian-confluence/3.3/com/atlassian/confluence/pages/Attachment.html" rel="nofollow">Attachment</a>&gt;</code>.</p>
<p>You need to sort the list of attachments using <code>Attachment.getlastModificationDate()</code>.</p>
<p>It would be nice to add a sort by parameter to this user macro!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David</title>
		<link>http://davidsimpson.me/2009/10/16/a-simpler-way-to-view-attachments-in-confluence/#comment-124</link>
		<dc:creator>David</dc:creator>
		<pubDate>Thu, 12 Aug 2010 13:29:56 +0000</pubDate>
		<guid isPermaLink="false">http://davidsimpson.me/?p=367#comment-124</guid>
		<description>We&#039;re now running this fine on Confluence 3.2 as is.  I&#039;m not sure why you get this error. Sorry.</description>
		<content:encoded><![CDATA[<p>We&#8217;re now running this fine on Confluence 3.2 as is.  I&#8217;m not sure why you get this error. Sorry.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

