Rethinking the CMS

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
User avatar
volomike
Forum Regular
Posts: 633
Joined: Wed Jan 16, 2008 9:04 am
Location: Myrtle Beach, South Carolina, USA

Rethinking the CMS

Post by volomike »

{Moderator: Please move this if it's not in the right forum topic area.}

I've been looking at CMSes lately, trying to think from my client's perspective and my own. On closer inspection in Joomla, if you're given an XHTML/CSS/DIV design and someone says, "Here, go stuff this into Joomla," that's not exactly an easy thing to pull off at all unless it was designed exclusively for Joomla. The same would go with Drupal or many other CMSes out there. There needs to be a completely new way to rethink how CMSes are done.

If I were to write a CMS, here's what it would be like:

* You start with an XHTML/CSS/DIV template, and call each one a "tab page". You use this template on every tab exclusively, permitting you to have some tabs that look different. This is because most of my clients start with an idea in a wireframe (or sort of good-looking) PSD or TIFF or PNG or JPEG file (an image), and then they send it to a designer for polish (again, another image), and then send it off to a chopper to convert into XHTML, CSS, and DIV work (along with some images that may or may not be chopped up). They often don't think of the "customize Joomla" perspective -- they think in graphical pictures.

* Next, you define in the CMS Admin System what menu item clicks will trigger the other tab pages.

* You rip out the "lorum ipsum" text out of the template tab pages and replace it with tags inside that mean things, such as <cms:articles count="5" sort="asc" /> or <cms:article index="1" tab="home" /> or <cms:custom href="gadgets/gadget1.php" />.

* In the CMS Admin System, you define what those tags link back to in the CMS either as canned gadgets or gadgets that you can build. For instance, cms:articles would be a canned gadget that shows a count of articles published into the CMS. Or, cms:custom would call your custom gadget page in the background, scrape its contents, and redisplay inside the section on the screen.

* In the CMS Admin System, you would have ways to manipulate and moderate the canned gadgets such as polls, sections, categories, articles, comments, and so on. For articles, you as the admin could have a BBCode editor to set how this is going to display in the page. For comments, your end users would have a BBCode editor as well (although a bit more limited), and you could moderate those comments or just let them all get posted as is, or remove them if they're bad.

The end result is that your client can now use an attractive and easy-to-use CMS Admin System for manipulating the canned gadgets, and then you could tack on other forms to manipulate the custom gadgets. If they want to change the layout, then they contract with you to change the XHTML/CSS/DIV layout.
matthijs
DevNet Master
Posts: 3360
Joined: Thu Oct 06, 2005 3:57 pm

Re: Rethinking the CMS

Post by matthijs »

{It's probably better in general discussion I think or business.}

About CMSes: I totally agree with you.

Coincidentally I have been doing a bit with Joomla this week. Was trying it out to see if it would fit a clients needs. The way everything has to be put together, with Modules, Blocks, Chromes, a single Template (why not more?), etc seems very, very awkward and certainly more difficult than it should be. It wouldn't be so bad if you get more features or flexibility in return, but so far it only seems to lock you in to things. I'll spend some more time with Joomla soon, but so far my impression's not that good. Too bad, because it does have the name of being a good system, and being "more of a real CMS" compared to say Wordpress. But the thing is, Wordpress might be a simple blogging tool, it is put together so flexible that it's really reaaly easy to do everything and more then the "traditional" cmses I've seen so far. Even if the main focus is on blogging, the way it handles pages and the way it allows people using the system to manage content, is very easy.

The way I see it you have 2 different perspectives:

1) The client (or editor). The one who gets to use the cms to manage content. He wants to log in and write pages. And then create a menu with those pages, if it is not done automatically. And sort pages, place them in a certain hierarchy, etc etc. Upload pictures to go in the page. Etc etc In short: manage content.

2) the web developer. He has a design and has build a few HTML templates with that. Say a Homepage, an Archives page and an About page. Now he wants to use that in the cms. Now it should be easy to , exactly as you say, replace the dummy content he had with some short pieces of code (PHP or other) to "pull" the content needed from the cms. So for the Homepage template you have build, one pice of content at the top, say $this->articles('featured','1','full'); and then below that the 5 latest news snippets $articles('news','5', 'summeries'); or something.

That should be all that's needed. Create content (pages, posts, categories, tags, comments) in the CMS. Pull it in from within the templates. The CMS system itself should stand in between managing everything.

One other thing that I like with WP is that you can just create more templates, dump them in the folder with the other templates, and a content editor then sees them appearing in a nice dropdown list of templates. So when you are editing a webpage, pick a different template from the dropdown and let that be used for that page. Very simple. There's just a few conventions you must know for the template code, used to pull in the content, so that the content does get pulled in well.
User avatar
volomike
Forum Regular
Posts: 633
Joined: Wed Jan 16, 2008 9:04 am
Location: Myrtle Beach, South Carolina, USA

Re: Rethinking the CMS

Post by volomike »

matthijs wrote:About CMSes: I totally agree with you.
About the closest approximation to a CMS that works like I've mentioned -- where you already have the XHTML template and you just want to drop in gadget tags that show stuff or let one comment, etc. -- that F/OSS project is called TextPattern.

For instance, in TextPattern, this tag will show the last 5 articles posted into the CMS for a given page:

Code: Select all

<txp:article limit="5" />
Sounds nice, right? Well, there's two gotchas:

* Unless you're a geek, the admin interface is confusing, so one has to build their own admin system that is more user-friendly, doing some of the things as the existing admin system. I mean, TextPattern's admin system ain't no WordPress, if you get my drift. The good news with that, however, is that you can leave the existing admin system for you as the PHP freelancer with clients, and then add in your own. And the admin system you build for your clients could be as simple as letting them manage categories, sections, and articles -- a mini-publishing system -- not much else.

* The editor of articles uses a funky language called Textile. This isn't BBCode. Most clients are used to at least BBCode, so you'll have to use a BBCode control on a page and then, when they post the article, convert it into Textile, and then when they re-edit it, convert it back into BBCode. If that won't work in one's time constraints, then build a toolbar that helps them format stuff in Textile. And, if all else fails, the client can be taught Textile and you can provide like a cheat-sheet above the form.

Anyway, there's a vast array of really good looking websites out there on TextPattern:

http://welovetxp.com/
User avatar
volomike
Forum Regular
Posts: 633
Joined: Wed Jan 16, 2008 9:04 am
Location: Myrtle Beach, South Carolina, USA

Re: Rethinking the CMS

Post by volomike »

Oh, even cooler! Two guys have written hacks for TextPattern so that it has a nicer admin interface and a tinyMCE control. Here's the screenshot. Ain't it a beaut?

http://www.electricprism.com/aeron/myadmin2.gif

Get the two hacks here:

http://forum.textpattern.com/viewtopic.php?id=26231&p=1
http://forum.textpattern.com/viewtopic.php?id=13089

If this were to ever grow popular, it would blow Joomla and Drupal out the water because of how flexible it is with anyone's template, because it's a snap to build your own gadgets, and because with Aeron and hak_tinyMCE, you can make the admin interface look just as smooth as Joomla.
matthijs
DevNet Master
Posts: 3360
Joined: Thu Oct 06, 2005 3:57 pm

Re: Rethinking the CMS

Post by matthijs »

About Txp: I haven't used it so I only know it superficially. What I do know is:
- building one own's admin interface sounds like a lot of work, just as hacking the system does. Most importantly, with the frequent update cycles of these systems you better make sure your client pays you for the work you have to do each time an update arrives.
- how much have you used Wordpress? It is mainly a blogging platform, but from all the "cms"es I've seen so far WP is the best and easiest to work with (so far. still studying more systems though). It does exactly what you want in it's template system. Another huge advantage (for me at least) is that the templates are plain PHP. So you have access to the full power of PHP, in case you need it. Say you want to integrate a complex form to your site: just make a template for that: include the normal header, footer and sidebar sections (or whatever other template sections there are), write the php for the form and you can even use the normal placeholder for the included content. Then in the admin section you create a new page, pick the template you just made from the dropdown list and it works.
Post Reply