Building a custom CMS, how to handle page settings?
- by davidosomething
Not a coldfusion specific question so answer however you can.
I've inherited a ColdFusion project where at the top of every page various page-setting specific variables are set, such as:
<cfset request.page.title = "Example Page">
<cfset request.page.machineTitle = "example_page">
<cfset request.page.isJQueryEnabled = 1>
<cfset request.page.showNavigation = 1>
<cfset request.page.SWFObjectVersion = 2.2>
I'm thinking about creating a database table with just
integer page_id
varchar key
varchar value
I'd reduce the variables at the top of every page to just the page id, and then call the DB for the correct settings.
Is this a good idea?
I hate reinventing the wheel, but this is a really big project that would require many months for a full content migration to a CMS.
What are the current practices for storing page settings? (e.g., what does WordPress do? Drupal? etc.)