Building a custom CMS, how to handle page settings?
Posted
by davidosomething
on Stack Overflow
See other posts from Stack Overflow
or by davidosomething
Published on 2010-06-12T21:52:07Z
Indexed on
2010/06/12
22:03 UTC
Read the original article
Hit count: 300
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.)
© Stack Overflow or respective owner