The title of my question seems simple but here is an example of what I want to do:
http://www.mayoclinic.com/health/infant-jaundice/DS00107
What happens on that page is whenever you click on a link to go a section (e.g. "Symptoms") in the article on "Infant Jaundice", it provides a URL parameter like this:
http://www.mayoclinic.com/health/infant-jaundice/DS00107/DSECTION=symptoms
As the DESCTION
parameter changes, you get different content on the same page DS00107
. The content changes as well as <meta keywords>
.
Can someone please tell me how this is achieved? I was thinking it was an if/else situation programmed into the page itself to display different properties depending on the URL parameter. I am using ColdFusion 10 as my web server.
I am not asking what technology to use e.g. AJAX. I don't mind having a page that reloads completely. But where will it get the correct article information from for the various HTML tags and DIVs on the page? Should it be in if/else statements or should it be stored in a database?
I was thinking storing it in a database might be tedious... you would have store all the paragraph and ordered list information in a table. But is it the correct way to do it?