<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
{foreach $map as $loc=>$item}
   <url>
      <loc>http://{$smarty.server.HTTP_HOST}{$loc|escape}</loc>
     {if $item.lastmod}<lastmod>{$item.lastmod|date_format:"%Y-%m-%d"}</lastmod>{/if}
     {if $item.changefreq}<changefreq>{$item.changefreq}</changefreq>{/if}
     {if $item.priority}<priority>{$item.priority}</priority>{/if}
   </url>
{/foreach}
</urlset>