Jump to content
Sign in to follow this  
Robert

Creating A Sitemap In Tgpx

Recommended Posts

Robert

1. Create a sitemap of all of your categories:

{php} echo '<?xml version="1.0" encoding="UTF-8"?>'; {/php}
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
{categories var=$categories order=name}
{foreach var=$category from=$categories counter=$counter}
<url>
<loc>http://www.YOURDOMAIN.com/{$category.name|htmlspecialchars|strtolower|treplace_special::''}/</loc>
</url>
{/foreach}

2. Create a sitemap of all of your galleries (if you host them locally and have them added to your TGPX database):

{define name=globaldupes value=true}
{define name=pagedupes value=false}

{* PULL THE SUBMITTED GALLERIES FROM THE DATABASE *}
{galleries
var=$galleries
type=any
format=any
getnew=true
allowused=true
preview=any
amount=10000
category=MIXED
sponsor=any
order=date_approved DESC
reorder=date_approved DESC}

{* DISPLAY ALL OF THE GALLERIES In SITEMAP FORMAT *}
{php} echo '<?xml version="1.0" encoding="UTF-8"?>'; {/php}
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
{foreach from=$galleries var=$gallery counter=$counter}
<url>
<loc>{$gallery.gallery_url|htmlspecialchars}</loc>
</url>
{/foreach}
</urlset>

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use, Privacy Policy, and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. policies