Jump to content
Sign in to follow this  
Robert

Creating A Sitemap In Tgpx

Recommended Posts

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×