I'm thinking of writing a CMS for semi-technical folks
So here's the idea:
Right now, when I make a website, I'vdde gotten to the point of setting up template pages (shared headers and navigation and other features) with an area for that particular page's content.
My latest experiment, which really works well for small sites, is to stick everything in a single php file and redirect 404 to it and let it figure out what path the visitor wanted and go there (i.e. it detects that you tried to access /aboutus/ and returns the proper page, built from the various parts). Even CSS is called this way, and I properly output the css file to the browser via php...
So I'm thinking of trying to automate this a little bit:
1. Store page contents in a database - but I'd be storing html, with a text interface to work on the files, not a GUI.
2. Have a page navigation structure with automatically generated navigation menus.
3. Allow for multiple page templates
4. Allow for multiple widgets/plugins that I'm currently thinking would be how a template is made. So this could be things like a list of the most recently updated pages to a calendar of events, or... I'm not totally sure yet.
5. Have page/widget/not sure what other level of variables - like for pages, an associated "page title" variable that the page header widget would look for and use somewhere in the graphical header area of the rendered page, as well as put in the html 'head' section so it appears in the browser's titlebar...
I suppose I want to be a little inspired by Wordpress and its concept of pages (as opposed to posts) and its widgets and customizeable sidebar; but try to make it easier to write useful plugins, and make the page templates themselves a part of what's stored in the database.
Does this make sense so far? Am I giving too much info or not enough? And what do you think?
8 comments
[ 3.3 ms ] story [ 31.2 ms ] threadSo a lot of what WordPress does, I like. But my idea would be geared towards making websites for small local businesses, for example; rather than blogs.
http://effectif.com/nesta
In my mind, these systems try to offer a complete GUI development interface. They're complex and difficult to learn.
Basically, I think there's a need for something far simpler.
The first step would be to write something that simply stores the main content portion of each page in a database, loading the correct content during the page building process.
So my page template might look like:
<html> <head><!--stuff--></head>
<body> <div id="header"><h1>Sitename</h1><h2><?=$pagetitle?></h2></div> <div id="content"><?=$pagecontent?></div> <div id="footer"><p>stuff</p></div> </body> </html>
There would be a backend interface to generate new pages and define the variables, like page title; a textbox to work with the page's HTML code... read/write this from/to database.
Complexity could grow from that - but that's the basic idea.
Are you aware of CMS that work from that point of view? Just the sheer simplicity of the system, in my mind, is different.
For example, you can work in HTML mode in Wordpress, but there's all the rest of it that goes with Wordpress that's not needed for a small site - it gets in the way.
However, if you want to go down to bare-bones stuff, give a try to http://ikiwiki.info/.
Quite a few solutions exist for such scenarios aswell.