Include album and image XML in Sone XML.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Wed, 13 Apr 2011 05:35:32 +0000 (07:35 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Wed, 13 Apr 2011 05:35:32 +0000 (07:35 +0200)
src/main/resources/templates/insert/sone.xml

index e25cac9..8d9aafd 100644 (file)
                <%/foreach>
        </reply-likes>
 
+       <%foreach currentSone.albums album>
+       <%first>
+       <albums>
+               <%/first>
+               <album>
+                       <id><%album.id|xml></id>
+                       <%ifnull !album.parent>
+                       <parent><%album.parent.id|xml></parent>
+                       <%/if>
+                       <title><%album.title|xml></title>
+                       <description><%album.description|xml></description>
+                       <%foreach album.images image>
+                       <%first>
+                       <images>
+                               <%/first>
+                               <image>
+                                       <id><%image.id|xml></id>
+                                       <creation-time><%image.creationTime|xml></creation-time>
+                                       <key><%image.key|xml></key>
+                                       <title><%image.title|xml></title>
+                                       <description><%image.description|xml></description>
+                                       <width><%image.width|xml></width>
+                                       <height><%image.height|xml></height>
+                               </image>
+                               <%last>
+                       </images>
+                       <%/last>
+                       <%/foreach>
+               </album>
+               <%last>
+       </albums>
+       <%/last>
+       <%/foreach>
+
 </sone>