Top Left Text cha

Web & App Development

This is yet another extension that doesn't work out of the box.  Qlue Sitemap gives errors in Google Webmaster Tools.  But it seems that all the other sitemap extensions I tried sucked also so I decided to fix the template on this one.  Here's how to do it with template overrides...

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   

0 #1 Timothy Johns 2015-07-04 18:02
A better solution is to use OS Map (extensions.joomla.org/profile/extension/structure-a-navigation/site-map/osmap). An Awesome sitemap extension from the developers of the 'old faithful' XMap.
Quote

Add comment


Security code
Refresh

  • No comments found

Leave your comments

Post comment as a guest

0
Your comments are subjected to administrator's moderation.
X