Skip to main content
Inspiring
November 24, 2008
Question

Output list of links from a cfm page

  • November 24, 2008
  • 2 replies
  • 581 views
Hi,
I've created a sitemap page for my site, which is a list of all the links on our site. Some of the page is static and some dynamic (there is no single query that retreives all this data). I now wish to create an xml sitemap for this page and submit the xml file to google. Is there an easy way of extracting all the links on this page:
http://www.artsprofessional.co.uk/sitemap.cfm

Once I have a list I figure i can loop over it and create the xml file.
This topic has been closed for replies.

2 replies

Inspiring
November 24, 2008
I would approach this the other way around. You've got some code that
outputs the relevant data as an HTML site map... use the same process to
output an XML site map (this is a good example of why one should separate
model from view...). In fact the XML site map is an easier process as it's
just a flat structure.

--
Adam
Inspiring
November 25, 2008
Some of my list isn't dynamic though (laziness on my part). Should I stick all my static URL data in a database, allowing it to be easily updated by the general public, and allowing me to create an xml file directly from the db? I should, shouldn't I? Thanks guys, it's never about quick fixes is it?!!
Inspiring
November 24, 2008
<cfhttp url=" http://www.artsprofessional.co.uk/sitemap.cfm">

<cfoutput>#htmlCodeFormat(cfhttp.filecontent)#</cfoutput>

From there it would be string, regular expression or XML manipulation.