<!--
    Produces: 'items' for urls
    Needs: a request context 'drawer', containing a listcontainer 'query'.
-->
<mm:context
    xmlns:jsp="http://java.sun.com/JSP/Page" 
    xmlns:mm="http://www.mmbase.org/mmbase-taglib-2.0" 
    id="drawer" scope="request">
  <jsp:output omit-xml-declaration="yes" />
  <mm:content type="text/xml">
    <mm:import externid="kupubasedir" reset="true" />
    <mm:listnodescontainer referid="query">
      <items>
        <mm:context>
          <mm:listnodes id="url">
            <resource id="${url.number}">   
              <uri><mm:field name="url" /></uri>
              <title>
                <mm:hasfield name="title">
                  <mm:field id="title" name="title"><mm:write /><mm:isempty><mm:field name="url"><mm:write /><mm:isempty>No title</mm:isempty></mm:field></mm:isempty></mm:field>
                </mm:hasfield>
                <mm:hasfield name="name">
                  <mm:field id="name"  name="name"><mm:write /><mm:isempty><mm:field name="url"><mm:write /><mm:isempty>No title</mm:isempty></mm:field></mm:isempty></mm:field>
                </mm:hasfield>
                <mm:notpresent referid="title">
                  <mm:notpresent referid="name">
                    <mm:field name="url" />
                  </mm:notpresent>
                </mm:notpresent>
              </title>
              <description><mm:field name="url" /></description>
              <icon>${kupubasedir}/common/kupuimages/link.png</icon>
            </resource>
          </mm:listnodes>
        </mm:context>
      </items>
    </mm:listnodescontainer>
  </mm:content>
</mm:context>
