title: Retrieving a list of media in umbraco
body: <p>I'm just starting to play with the XSLT system in umbraco where I was hoping to produce a macro which listed all the media under a specific media directory.  I have come across umbraco.library:GetMedia but, frankly, I have no idea what to pass to it in order to get a list of items.  The API docs at <a href="http://umbraco.org/apiDocs/html/M_umbraco_library_GetMedia.htm" rel="nofollow noreferrer">http://umbraco.org/apiDocs/html/M_umbraco_library_GetMedia.htm</a> seem to suggest that what I probably want is to look up a node (how?) and then pass it in with</p>
  
  <pre><code>umbraco.library:GetMedia(&lt;some node id&gt;, true)
  </code></pre>
  
  <p>How would I go about getting that initial node id?</p>
  
  <p>Subsequently would something like this work?</p>
  
  <pre><code>&lt;xsl:for-each select="umbraco.library:GetMedia(&lt;SOMEMAGIC&gt;, 'true')"&gt;
      &lt;li&gt;
          &lt;a href="{umbraco.library:NiceUrl(@id)}"&gt;
              &lt;xsl:value-of select="@nodeName"/&gt;
          &lt;/a&gt;
      &lt;/li&gt;
  &lt;/xsl:for-each&gt;
  </code></pre>