What you’re seeing is URL rewriting. This can be done within the web server, not necisarlay with in ColdFusion/PHP ext. What the web server will do is rewrite the url mayoclinic.com/health/infant-jaundice/DS00107/DSECTION=symptoms
to a link something like: mayoclinic.com/health/infant-jaundice/DS00107/index.cfm?DSECTION=symptoms
.
For displaying the content with in the page, I would use as switch statment vs. using a series of if/else’s if you have more then 2-3 possible displays. You can use as many case blocks as needed.
<cfswitch expression=”#url.DSECTION#>
<cfcase value="symptoms">
<!--- symptoms code / html here --->
</cfcase>
<cfcase value="causes">
<!--- causes code / html here --->
</cfcase>
<cfdefaultcase>
<!--- default code / html here --->
</cfdefaultcase>
</cfswitch>
This is a very simple example, to illustrate the idea of URL rewriting.
Addition:
I was wondering if perhaps they were using a database query rather than if/else statements?
Yes you could.For a query driven results you could do something like:
<cfquery name="pageContent" datasource="yourDatasource">
SELECT htmlText
FROM pages
WHERE page = 'dir/index.cfm'
AND content <cfqueryparam cfsqltype="cf_sql_varchar" value="#url.DSECTION#">
</cfquery>
<cfoutput>#pageContent.htmlText[1]#</cfoutput>
If the content is static, and rarely updated, another option would be to look into includes and try to leverage the ability to execute code based on the content.
<cfinclude template="./includes/symtoms.cfm"> or <cfinclude template="./includes/#url.DSECTION#.cfm">