Hi,
I am not sure what should I do with the sitemap_xml view or layout files?
If I try to open it in the browser on my local machine
localhost/clarenssa/sitemap
I get this error:
XML Parsing Error: XML declaration not well-formed
Location:
http://localhost/clarenssa/sitemap_xml.phpLine Number 1, Column 37:<?xml version="1.0" encoding="UTF-8"; ?><urlset xmlns="
http://www.sitemaps.org/schemas/sitemap/0.9"
------------------------------------^
What should I actually do with these files?
Thanks
Comments
The sitemap_xml.php file is there if you want to dynamically create your sitemap.xml file. There are various ways to pull in the locations of the pages (e.g. you can use fuel_nav to pull in all the pages in the navigation, you can query the pages_model to get all the pages saved in the CMS by using the pages_model::all_pages_including_views method). Then in the config/routes.php file, you can uncomment the line about the route to the sitemap.xml.
http://brookstowninn.jbwebservices.com/help_sitemap_xml.jpg
echo '<?xml version="1.0" encoding="UTF-8"?>';
becomes
<?xml version="1.0" encoding="UTF-8"; ?>
Windows, IIS Express... FireFox and Chrome
echo str_replace(';', '', '<?xml version="1.0" encoding="UTF-8"?>');
There is an old comment in the code for the fuel/application/views/sitemap_xml.php view file that says:
"needed because of the Loader class mistaking the end of the xml node as PHP in load->view"