Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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?


share|improve this question
up vote 3 down vote accepted

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).

share|improve this answer

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

share|improve this answer
HTML is a static language. For dynamic content your best choices are either PHP or JSP (JavaServer Pages). – Grumpy ol' bear Sep 1 '09 at 16:46
@NoCanDo: Aren't Python, Ruby, .NET, pretty much anything else more available than JSP these days? – Macha Aug 22 '10 at 16:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .