Building an Accurate XML Sitemap

ces55739's Avatar


07 Oct, 2014 06:20 PM


We are building our XML sitemap and only want to include pages that are live on production. Sometimes we publish pages to staging weeks or months before they go live, and we don't want to have an incorrect sitemap that entire time.

Is there a way to do this?

  1. 1 Posted by ces55739 on 07 Oct, 2014 06:22 PM

    ces55739's Avatar

    I should specify....

    We have a Site for our live production pages.

    Then we have a Site used for Staging. This is just to accurately see what the live would look like.

    So there are times where we publish to staging for weeks or months, without publishing to production.


  2. 2 Posted by Wing Ming Chan on 08 Oct, 2014 11:47 AM

    Wing Ming Chan's Avatar


    Will you consider using web services in PHP?


  3. 3 Posted by ces55739 on 08 Oct, 2014 03:17 PM

    ces55739's Avatar


    Could you give a brief explanation of how that could look with Sitemaps?

  4. 4 Posted by Wing Ming Chan on 08 Oct, 2014 03:55 PM

    Wing Ming Chan's Avatar

    OK, I am not sure if this would fit the bill. But still, here are some details.

    In Managing Orphans, I talked about how to compare pages and files between a production server and Cascade. There, if a file exists on the server but not in Cascade, it can be considered an orphan. In your case, it is the reverse: a file or a page existing in Cascade but not on your production server is not a candidate for the sitemap.

    If I understand what you want correctly, then I will suggest these:

    1. Walk through a site on your server, and compare what you can find there with assets in Cascade.
    2. Whenever you see a folder, a page, an image, a PDF file, etc. on the server, match that to an asset in Cascade to make sure it exists and is publishable. If both are true, add the info, as an element, to an XML object.
    3. When the traversal is done, you have an XML object containing something that looks like a sitemap. You can process the XML object to create the sitemap on your server, or you can push the content back into an XML block in Cascade.

    I hope these steps make sense to you.


  5. 5 Posted by rudinesbitt on 24 Nov, 2014 01:56 PM

    rudinesbitt's Avatar

    Those steps worked for me Wing. I was also getting unwanted pages in my sitemap before they were ready for publishing.

  6. Tim closed this discussion on 17 Apr, 2015 06:54 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac