ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

EE Forums Google Sitemap Template

February 01, 2011 12:46pm

Subscribe [3]
  • #1 / Feb 01, 2011 12:46pm

    Ace Prod

    111 posts

    Hi guys,

    I’m trying to get sorted a sitemap template for our forums. Has anyone already produced something like this using the exp query tags? I’m just looking for a little advice as to the best way to implement it.

    so far I’ve produced the following, however Google just refuses it:

    <?xml version="1.0" encoding="UTF-8"?>
    <urlset >
    
    {exp:query sql="SELECT topic_id FROM exp_forum_topics WHERE status LIKE 'o' "}
      <url>
          <loc>http://www.website.com/index.php/forums/viewthread/{topic_id}/</loc>
          <changefreq>daily</changefreq>
      </url>
    {/exp:query}
    
    </urlset>

    Thanks!

    David.

  • #2 / Feb 02, 2011 6:30am

    John Henry Donovan

    12339 posts

    David,

    Does your query work and its just not validating?
    If so then I might move this thread to the CodeShare Corner for you where you can receive community help about the ins and outs of a Google sitemap

  • #3 / Feb 02, 2011 10:42am

    Ace Prod

    111 posts

    Hi John,

    Your right, it does work it’s just not validating. Would you mind movng it for me?

    Thanks,

    David.

  • #4 / Feb 02, 2011 10:48am

    John Henry Donovan

    12339 posts

    No problems

  • #5 / Feb 02, 2011 10:53am

    handyman

    509 posts

    FYI, not sure if this helps you, bug goog seems to do a pretty good job on their own with no site map!
    See enclosed.

  • #6 / Dec 28, 2011 11:56pm

    gaweb

    77 posts

    This is what i use for my site map, works,

    {exp:forum:topic_titles board="FORUMNAME" sort="desc" orderby="recent_post" limit="100"}
    <url> 
    <loc>{thread_path='forums/viewthread'}</loc> 
    <lastmod>{last_post_date format="{DATE_W3C}"}</lastmod> 
    <changefreq>monthly</changefreq> 
    0.6</priority> 
    </url> 
    {/exp:forum:topic_titles}

    Mike

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases