html to dynamicly list files in a directory

1

I am in the process of redoing some of our company website. We do a lot of recruiting and so we change job descriptions on our job offering page quiet often.

I was wondering what is the best way to have some sort of dynamic table of contents so that if I add an additional job description that I don't have to edit the TOC.

Here is what it looks like currently http://www.markonsolutions.com/opportunities.html

which is the style I like but If I add/remove a page I have to edit this page. Is there anyway that I can make the web page just see everything in a folder and list it there?

thanks

Crash893

Posted 2009-09-01T16:30:04.553

Reputation: 1 532

Answers

3

Use a scripting language like PHP to read the files in the directory. Personally I would do something like this:

  1. Create a PDF file for each job description (i.e. design-manager.pdf , financial-manager.pdf)

  2. Use PHP to loop through the directory, and add the file name to an array

  3. Manipulate the array to output the HTML (remove the dash using str_replace and capitalize the job title using ucwords).

Matt

Posted 2009-09-01T16:30:04.553

Reputation: 156

3

html can't do this. Use CGI or look into a scripting language such as PHP, perl, asp, etc.

J Sidhu

Posted 2009-09-01T16:30:04.553

Reputation: 606

1@NoCanDo: Aren't Python, Ruby, .NET, pretty much anything else more available than JSP these days? – Macha – 2010-08-22T16:20:40.477

1HTML is a static language. For dynamic content your best choices are either PHP or JSP (JavaServer Pages). – Grumpy ol' Bear – 2009-09-01T16:46:06.207