Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 373
  • Last Modified:

Coldfusion dynamic site map

Is there a way to make a dynamic site map that consists of all the pages in my website? The pages themselves are not stored in a database. I want to display th epage title and a link to that page.
0
semerj
Asked:
semerj
1 Solution
 
dgrafxCommented:
There is no way to just do this unless you have some logic in place preparing for this.

What I mean is you could do a combination of cfdirectory and cfif statements.
Basicly you'd "crawl" the top level directory making links to files then crawling subdirectories again making links again to files in each directory with a heading of the directory the files are in.

But the problem is (I don't know how you develop but in my case) most of the files found are not to be accessed directly.
so this is where my opening statement "some logic is place" has meaning.
like if you have a folder named "includes" where you have all your includes, you could then do
<cfif name neq "includes"> in your cfdirectory output. This would all get fairly complex but if you really wanted to do it.

To display the page title - you'd have to read the file with cffile and parse looking for <title> as start position and </title> as end position.


0
 
semerjAuthor Commented:
Thanks. I thought so.
0
 
SidFishesCommented:
maybe you can try this

http://cfdj.sys-con.com/read/41800.htm

If you created a cfschedule to spider your site on a regular basis it would probably do sort of what you want.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now