<?php
	header('Content-type: application/xml');
    include('perch/runtime.php');
    
    
    $domain        = 'http://'.$_SERVER["HTTP_HOST"];
    $url           = $domain.$_SERVER["REQUEST_URI"];
    $sitename      = "The name of my website";

    PerchSystem::set_var('domain',$domain);
    PerchSystem::set_var('url',$url);
    
    
    //find projects and pass them into array
    $project_list = perch_content_custom('Projects', array(
          'page' => '/work/index.php',
          'template' => '_projects_in_sitemap.html',
          'include-parent' => true,
     ), true); 
     
    //set the array for use in the nav template
    PerchSystem::set_var('projectlist', $project_list);
    
    //find news and pass into array
    $news_list = perch_blog_custom(array(
          'template' => '_blog_in_sitemap.html',
     ), true); 
     
    //set the array for use in the nav template
    PerchSystem::set_var('newslist', $news_list);
    
    perch_pages_navigation(array(
        'template'=>'sitemap.html',
        'flat'=>true,
        'hide-extensions' => true,
      ));
?>
