by (450 points)
when generating the sitemap, only flat menu pages and main menu pages are included in the list.

All the "no menu" pages, actually the majority of my content, are excluded from the listing,

I am running Seotoaster v2.1.0 with ecommerce.

How can I fix this?

Thank you,

2 Answers

by (1.0k points)
Hello, Carlo.

Please provide us. You are look  http://sitename/sitemap.html  or http://sitename/sitemap.xml?
by (450 points)
Hello Vitaly,

thank you for answering me.

I was looking at the .html page, the .xml version is complete.

How can I make the .xml version renders in the .html page?

Thank you!
by (1.0k points)
To do this, you must make changes in sitemap.php.

Best regards, Vitaly.
by (450 points)
Ok, thanks! I will take a look at it and update you in case I need further help.
by (450 points)
Hi, I figured out how to solve it, thanks to your suggestion.
I sent the sample code to SeoToaster dev team for a compliancy check, I will post it here when they give me green light.
by (1.3k points)
We took into consideration your suggestions regarding sitemap "nomenu pages", this functionality will be in the next release of SeoToaster.
by (450 points)
edited by
Hello Artem,
I'm glad to hear that!
Here's the code to add in the default Seotoaster files, so even users who do not upgrade will benefit from this solution:

add this in sitemap.php after
$flatPages = Application_Model_Mappers_PageMapper::getInstance()->fetchAllStaticMenuPages();


 /* we add standard pages */
 $nomenuPages = Application_Model_Mappers_PageMapper::getInstance()->fetchAllNoMenuPages();


Near the end of file, after:

$this->_view->pages      = $pagesList;
$this->_view->flatPages  = $flatPages;

Add this code on a new line:

$this->_view->nomenuPages  = $nomenuPages;


add this to sitemap.phtml after flat menu pages


<!-- nomenu pages here -->
<?php if(!empty($this->nomenuPages)): ?>
 <ul class="sitemap">
 <?php foreach ($this->nomenuPages as $key => $page): ?>
 <?php $page = $page->toArray(); ?>
 <li class="page"><a title="<?php echo isset($page['optimizedH1']) ? $page['optimizedH1'] : $page['h1']; ?>" href="<?php echo $this->websiteUrl . (isset($page['optimizedUrl']) ? $page['optimizedUrl'] : $page['url']); ?>"><?php echo (isset($page['optimizedNavName']) ? $page['optimizedNavName'] : $page['navName']) ; ?></a></li>
 <?php endforeach; ?>
<?php endif; ?>


For everyone using this: mind not to break any line in the posted code and always make a backup of original files before doing any change!

Trust me, you will thank yourself for doing this when you mess up something - and it happens.

by (450 points)

I noticed I didn't mentoned another necessary edit to the core files, in order to render nomenu pages in the sitemap.html page.

I edited my answer with the full working version.