Inside of your site's theme, create the following folders and file (xml.php) so that the following example file path exists...
yourdomain.com/templates/your_template/html/com_sitemap/default/xml.php
The file, xml.php should contain the following:
<?php /** * Qlue Sitemap * * @author Jon Boutell * @package QMap * @license GNU/GPL * @version 1.0 * * This component gathers information from various Joomla Components and * compiles them into a sitemap, supporting both an HTML view and an XML * format for search engines. * */ defined('_JEXEC') or die('Restricted Access'); ?> <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> <?php if (!empty($this->items)): ?> <?php foreach($this->items as $key => $link): ?> <url> <loc><?php echo $this->url . $this->escape($link) . "/"; ?></loc> </url> <?php endforeach; ?> <?php endif; ?> </urlset>
By the way, if you want to make the HTML sitemap look good (the one that visitors see), here's some CSS. You might want to change the colors to match your site. By the way, you need to have a unique body tag on your site. If you don't and want to add one to your index page, check it out here.
body.siteMap .content { text-align:center; } body.siteMap .content ul>li { display: inline-block; margin: 6px 3px; } body.siteMap .content ul>li>a { background: #0000ff; color: #fff; padding: 2px 8px; border: 1px solid #000; border-radius: 5px; } body.siteMap .content ul { border: 1px solid #000; padding: 10px 20px; border-radius: 20px; box-shadow: 0 0 10px #000; }
That's it. Qlue Sitemap should work fine now.
This works on the latest version of Qlue Sitemap in Joomla 3.3+
Comments
RSS feed for comments to this post