Sitemap CGBlog - error unknown tag "CGBlog [solved]

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
howey
Forum Members
Forum Members
Posts: 158
Joined: Fri Sep 14, 2007 1:05 pm

Sitemap CGBlog - error unknown tag "CGBlog [solved]

Post by howey »

Hi

I m trying to use sitemapmadesimple to generate an xml file. But I need it to include articles from both the news and CGBlog.

I tried this method http://forum.cmsmadesimple.org/viewtopi ... og#p292142

Using this code:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
{* Note: Web crawlers usually discover pages from links within the site and from other sites. Sitemaps supplement this data to allow crawlers that support Sitemaps to pick up all URLs in the Sitemap and learn about those URLs using the associated metadata.  It is not strictly necessary to use a sitemap on a well designed site.  This is just an aide to the web crawlers in finding data from your website. *}



<urlset xmlns="http://www.google.com/schemas/sitemap/0.9"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://www.google.com/schemas/sitemap/0.9
	http://www.google.com/schemas/sitemap/0.9/sitemap.xsd">
	
{strip}

{foreach from=$output item='page'}
<url>
  <loc>{$page->url}</loc>
  <lastmod>{$page->date|date_format:"%Y-%m-%d"}</lastmod>
  <priority>{$page->priority}</priority>
  <changefreq>{$page->frequency}</changefreq>
</url>
{/foreach}

{assign var='foo' value=$mod}{CGBlog detailpage='projects' assign='junk2'}{assign var=mod value=$foo}
{foreach from=$items item=entry}
<url>
<loc>{$entry->detail_url}</loc>
<lastmod>{$entry->postdate|date_format:"%Y-%m-%d"}</lastmod>
<priority>{$page->priority}</priority>
<changefreq>{$page->frequency}</changefreq>
</url>
{/foreach}

{/strip}

</urlset>
I also tried using:

Code: Select all

{news number=1000 detailpage='news-detail' assign='junk'}
{foreach from=$items item=entry}
<url>
<loc>{$entry->moreurl}/d,McFTDetail</loc>
<lastmod>{$entry->postdate|date_format:"%Y-%m-%d"}</lastmod>
<priority>{$page->priority}</priority>
<changefreq>{$page->frequency}</changefreq>
</url>
{/foreach}
Both returned similar errors as below:

Code: Select all

Syntax Error in template "module_db_tpl:SiteMapMadeSimple;xml_cpesitemap"  on line 22 "{assign var='foo' value=$mod}{CGBlog detailpage='projects' assign='junk2'}{assign var=mod value=$foo}" unknown tag "CGBlog"
This error seems to be a fatal if I make the tempalte the default and I have to uninstall sitemapmadesimple, to get rid of the error.

Anybody come across this, any remedies?
Last edited by howey on Wed Oct 09, 2013 2:20 pm, edited 1 time in total.
howey
Forum Members
Forum Members
Posts: 158
Joined: Fri Sep 14, 2007 1:05 pm

Re: Sitemap to include CGBlog - syntax error unknown tag "CG

Post by howey »

Hi

I eventually found the answer in the forge entry under "bug tracker".

Code: Select all

You need to use the cms_module tag to call the other module i.e. {cms_module
module='CGBlog' number='1000'}
Rather than calling the module shortform

Code: Select all

{CGBlog}
Post Reply

Return to “Modules/Add-Ons”