SiteMapMadeSimple with CGBlog- and/or News-Module?
SiteMapMadeSimple with CGBlog- and/or News-Module?
Is there any way to get blog- and/or newsentries from the CGBlog- and/or Newsmodule processed by SiteMapMadeSimple?
Those modules regularly generate new pages (e.g. urls) for which an automatic addition to the sitemap.xml would make the most sense.
Those modules regularly generate new pages (e.g. urls) for which an automatic addition to the sitemap.xml would make the most sense.
Re: SiteMapMadeSimple with CGBlog- and/or News-Module?
Hmmm, I'd like this as well. This module gives the main news URL but none of the news stories are included in the feed.
e.g. http://www.example.com/news/ is shown but
http://www.example.com/news/29/63/Outst ... ,JGDetail/ (a URL to a news story) is not shown in the feed.
I notice this feature has been requested since 2009:
http://dev.cmsmadesimple.org/feature_request/view/3369
e.g. http://www.example.com/news/ is shown but
http://www.example.com/news/29/63/Outst ... ,JGDetail/ (a URL to a news story) is not shown in the feed.
I notice this feature has been requested since 2009:
http://dev.cmsmadesimple.org/feature_request/view/3369
-
- Power Poster
- Posts: 751
- Joined: Fri Sep 12, 2008 2:34 pm
Re: SiteMapMadeSimple with CGBlog- and/or News-Module?
Look here:
http://www.blattertech.ch/blog/6/Sitema ... eitern.htm
it's in german. copy the code in your SitemapMadeSimple Template, then it works.
http://www.blattertech.ch/blog/6/Sitema ... eitern.htm
it's in german. copy the code in your SitemapMadeSimple Template, then it works.
Re: SiteMapMadeSimple with CGBlog- and/or News-Module?
Hey thanks! This worked well.
This is what I ended up using in the template. Note for other users - the 2 instances of 63 below are the content_id of the news detail page on my site - you'll need to change this for your own site.

Code: Select all
{capture assign='junk'}{news number='1000'}{/capture}
{foreach from=$items item=entry}
{assign var=utmpNEWS value=$entry->moreurl|replace:'//':'/63/'|replace:'http:/63':'http:/'}<url>
<loc>{$utmpNEWS}</loc>
<lastmod>{$entry->postdate|date_format:"%Y-%m-%d"}</lastmod>
<priority>{$page->priority}</priority>
<changefreq>{$page->frequency}</changefreq>
</url>
{/foreach}
-
- Support Guru
- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
Re: SiteMapMadeSimple with CGBlog- and/or News-Module?
a: why not use the 'assign' parameter to news (it works by default for all module calls, and is faster than captur):
b: Why not use the 'detailpage' parameter to news... so you don't have
to do the search/replace
Code: Select all
{news number=1000 assign='junk'}
to do the search/replace
Code: Select all
{news number=1000 detailpage='news_detail' assign='junk'}
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Re: SiteMapMadeSimple with CGBlog- and/or News-Module?
Thanks Calguy
I think the answer to your "Why not use...?" is "Because I didn't know how..."
I am now using your technique and my code is
That's neater. Note that I still need a suffix on the URL as shown in the code - /d,McFTDetail in this case - otherwise some of the styling doesn't seem to work.

I think the answer to your "Why not use...?" is "Because I didn't know how..."

I am now using your technique and my code is
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}
-
- Forum Members
- Posts: 50
- Joined: Mon Feb 21, 2011 2:08 am
Re: SiteMapMadeSimple with CGBlog- and/or News-Module?
Can this be tweaked to be used with SEO Tools module?
That module doesn't have a default template where i can easily insert this code?
That module doesn't have a default template where i can easily insert this code?
- fearmydesign
- Power Poster
- Posts: 363
- Joined: Sun Feb 28, 2010 10:54 pm
Worked Perfect!... quick question
Thank you this worked perfect! Below is the code I used, but I have a question I couldn't figure out... where does the number 89 come from on my News module? I noticed all the articles have that number assigned, so I had to replace the '//' with that 89 as below. Thank you.
Code: Select all
{news number=1000 detailpage='news-detail' assign='junk'}
{foreach from=$items item=entry}
<url>
<loc>{$entry->moreurl|replace:'//':'/89/'|replace:'http:/89':'http:/'}</loc>
<lastmod>{$entry->postdate|date_format:"%Y-%m-%d"}</lastmod>
<priority>{$page->priority}</priority>
<changefreq>{$page->frequency}</changefreq>
</url>
{/foreach}
Re: SiteMapMadeSimple with CGBlog- and/or News-Module?
that would be the page id of your detailpage "news-detail"
Re: SiteMapMadeSimple with CGBlog and News-Module?
Hi, I followed the instructions I've found in the many posts about this subject and got it all working, however the actual sitemap.xml file is not updated while it has 0777 write permissions (checked with FileZilla).
This is my SiteMapMadeSimple template code for who is interested :
The sitemap-file content is showed correctly on the "info" tab in the SiteMapMS admin page. All news articles and blogposts are in the sitemap with the correct URL (I can copy/past them in my browser and end up on the correct page with correct styling).
When I verify http://www.mysite.tld/sitemap.xml is see only the list of actual pages but not the news articles and not the blogposts.
Preferences:
Generate a static sitemap.xml file : YES
Dynamically update the static xml file when content is changed : YES
I've also clicked "Save Sitemap" button on the Info-tab, but without success of updating the static sitemap file.
Any idea what the reason might be ? Thanks for your feedback.
PS : I'm using 1.11.4 "Fernandina" with the latest versions of all modules.
This is my SiteMapMadeSimple template code for who is interested :
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.google.com/schemas/sitemap/0.84"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.google.com/schemas/sitemap/0.84
http://www.google.com/schemas/sitemap/0.84/sitemap.xsd">
{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}
{news number=1000 detailpage='nieuws' assign='junk'}
{foreach from=$items item=entry}
<url>
<loc>{$entry->moreurl}</loc>
<lastmod>{$entry->postdate|date_format:"%Y-%m-%d"}</lastmod>
<priority>{$page->priority}</priority>
<changefreq>{$page->frequency}</changefreq>
</url>
{/foreach}
{assign var='foo' value=$mod}{CGBlog detailpage='blog' 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}
</urlset>
The sitemap-file content is showed correctly on the "info" tab in the SiteMapMS admin page. All news articles and blogposts are in the sitemap with the correct URL (I can copy/past them in my browser and end up on the correct page with correct styling).
When I verify http://www.mysite.tld/sitemap.xml is see only the list of actual pages but not the news articles and not the blogposts.
Preferences:
Generate a static sitemap.xml file : YES
Dynamically update the static xml file when content is changed : YES
I've also clicked "Save Sitemap" button on the Info-tab, but without success of updating the static sitemap file.
Any idea what the reason might be ? Thanks for your feedback.
PS : I'm using 1.11.4 "Fernandina" with the latest versions of all modules.
Re: SiteMapMadeSimple with CGBlog- and/or News-Module?
You did chnage a page to set an event te recreate the sitemap?
What is your system information?
Grtz. Rolf
What is your system information?
Grtz. Rolf
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Re: [SOLVED] SiteMapMadeSimple with CGBlog- and/or News-Modu
Rolf, thanks for the tip !
The sitemap.xml file is indeed automatically updated when a new page is created or modified. I had tested everything except this.
This topic is now closed for me.
Dirk.
The sitemap.xml file is indeed automatically updated when a new page is created or modified. I had tested everything except this.
This topic is now closed for me.
Dirk.
- fearmydesign
- Power Poster
- Posts: 363
- Joined: Sun Feb 28, 2010 10:54 pm
Re: SiteMapMadeSimple with CGBlog- and/or News-Module?
As I can see from my own post on this thread last year, I was able to get this to work... but for some reason, now, I keep getting an error saying unknown tag "news"
I have the exact same code as last time (except for the replacement), but for some reason it doesn't like the "news" tag...
Any thoughts anyone?
ERROR DISPLAYED
Nope, I also tried the old cms_module calling... but doesn't work
...tried the original example offered with capture, but still nothing
I have the exact same code as last time (except for the replacement), but for some reason it doesn't like the "news" tag...
Code: Select all
{news number=1000 detailpage='Detail' assign='newspages'}
{foreach from=$items item=entry}
<url>
<loc>{$entry->moreurl}</loc>
<lastmod>{$entry->postdate|date_format:"%Y-%m-%d"}</lastmod>
<priority>{$page->priority}</priority>
<changefreq>{$page->frequency}</changefreq>
</url>
{/foreach}
ERROR DISPLAYED
Code: Select all
ERROR: at line 709 in file /home/content/43/11408043/html/lib/smarty/sysplugins/smarty_internal_templatecompilerbase.php:
Message:
Syntax Error in template "module_db_tpl:SiteMapMadeSimple;xml_Main" on line 17 "{news number=1000 detailpage='Detail' assign='newspages}" unknown tag "news"
Code: Select all
{cms_module module='news' detailpage='new_page'....
Code: Select all
{capture assign='junk'}...
Rod
"Be careful who you step on your way up; because you never know who you'll meet on your way down!" - or something like that.
"Be careful who you step on your way up; because you never know who you'll meet on your way down!" - or something like that.
-
- Support Guru
- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
Re: SiteMapMadeSimple with CGBlog- and/or News-Module?
The module name is News not news
{news} is a shortcut we added for backwards compatibility, but probably does not work from the admin interface.
{cms_module module=News} should work.
{news} is a shortcut we added for backwards compatibility, but probably does not work from the admin interface.
{cms_module module=News} should work.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Re: SiteMapMadeSimple with CGBlog- and/or News-Module?
{news number=1000 detailpage='Detail' assign='newspages'} <- Note missing tagfearmydesign wrote:Syntax Error in template "module_db_tpl:SiteMapMadeSimple;xml_Main" on line 17 "{news number=1000 detailpage='Detail' assign='newspages}" unknown tag "news"
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
Migrating Company Directory module to LISE
- + - + - + - + - + - + -