<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
  xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title><{$channel_title}></title>
    <link><{$channel_link}></link>
    <description><{$channel_desc}></description>
    <lastBuildDate><{$channel_lastbuild}></lastBuildDate>
    <docs>http://backend.userland.com/rss/</docs>
    <generator><{$channel_generator}></generator>
    <category><{$channel_category}></category>
    <managingEditor><{$channel_editor}></managingEditor>
    <webMaster><{$channel_webmaster}></webMaster>
    <language><{$channel_language}></language>
     <image>
      <title><{$channel_title}></title>
      <url><{$image_url}></url>
      <link><{$channel_link}></link>
      <width><{$image_width}></width>
      <height><{$image_height}></height>
    </image>


<{foreach name=i item=module from=$sitemap.modules}>
  <{if $module.name}>
    <item>
      <title><{$module.name}></title>
      <link><{$smarty.const.XOOPS_URL}>/modules/<{$module.directory}></link>
      <description><{$module.name}></description>
      <lastmod><{$module.lastmod}></lastmod>
      <guid><{$smarty.const.XOOPS_URL}>/modules/<{$module.directory}></guid>
      <category><{$module.name}></category>
    </item>
    <{foreach item=parent from=$module.parent}>
	    <item>
	      <title><{$parent.title}></title>
	      <link><{$smarty.const.XOOPS_URL}>/modules/<{$module.directory}>/<{$parent.url}></link>
	      <description><{$parent.title}></description>
				<{if $lastmod == ""}>
	      	<lastmod><{$today}></lastmod>
				<{else}>
	      	<lastmod><{$lastmod}></lastmod>
				<{/if}>
	      <guid><{$smarty.const.XOOPS_URL}>/modules/<{$module.directory}>/<{$parent.url}></guid>
	      <category><{$parent.title}></category>
	    </item>
      <{if $show_subcategoris}>
      <{foreach item=child from=$parent.child}>
		    <item>
		      <title><{$child.title}></title>
		      <link><{$smarty.const.XOOPS_URL}>/modules/<{$module.directory}>/<{$child.url}></link>
		      <description><{$childd.title}></description>
		      <{if $child.lastmod}><lastmod><{$child.lastmod}></lastmod>
					<{else}>
	      	<lastmod><{$today}></lastmod>
					<{/if}>
		      <guid><{$smarty.const.XOOPS_URL}>/modules/<{$module.directory}>/<{$child.url}></guid>
		      <category><{$parent.title}></category>
		    </item>
      <{/foreach}>
      <{/if}>

    <{/foreach}>
    <{foreach item=sublink from=$module.sublinks}>
		    <item>
		      <title><{$sublink.title}></title>
		      <link><{$sublink.url}></link>
		      <description><{$sublink.title}></description>
		      <{if $sublink.lastmod}>
		      	<lastmod><{$sublink.lastmod}></lastmod>
					<{else}>
	      		<lastmod><{$today}></lastmod>
					<{/if}>
		      <guid>>/<{$sublink.url}></guid>
		      <category><{$sublink.title}></category>
		    </item>
    <{/foreach}>
  <{/if}>

<{/foreach}>
  </channel>
</rss>
