Webmasters Stack Exchange is a question and answer site for pro webmasters. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Possible Duplicate:
Which Content Management System (CMS)/Wiki should I use?

I am looking for a CMS where I can layout the page from scratch using HTML/PHP/CSS and simply enter code such as:-

FOR EACH (listOfArticles) SORT mostRecent CATEGORY news LIMIT 5
    <div class="articleTitle">{title}</div>
    <div class="arcielBody">{body}</div>

to get a list of the five most recent articles of a certain category in the relevant place.

Does such a thing exist anymore? Unless my mind is playing tricks on me, the CMSs of five or ten years ago had this approach. I am thinking of MovableType and the now defunct CityDesk.

It seems to me that CMSs these days have a 'templates first' approach. I.E. you must always choose a template before doing anything - which I find really painful. Learning how to design these structured templates also seems overly painful.

So can anyone help me in my quest?

Thank you, Mark

share|improve this question

marked as duplicate by Hamlet Sep 25 '12 at 22:43

This question was marked as an exact duplicate of an existing question.

(1) Do you know a programming language? (2) What you've outlined above is a template engine/language so do you know which one you've described? (3) Having to know what FOR EACH (listOfArticles) SORT mostRecent CATEGORY news is beforehand is not equally painful? – Anthony Hatzopoulos Sep 25 '12 at 18:26
Hi Anthony. (1) I am learning PHP and MySQL. I have been sitting in front of a computer most days for 20 years, so I can figure most things. (2) The code is vague and fake, from my memories of CityDesk and MovableType syntax. But I haven't done any web stuff with CMS for more than 5 years - except a little SharePoint customisation in my old job. (3) It would suit me better, I am finding after reading about the big CMSs these days and spending some time trying to get into WordPress. Thanks for reading! – Mark Sep 25 '12 at 18:32
This doesn't make sense. How, in your mind, is your code snippet not templating? For that matter it's actually closer to WordPress than Movable Type, since you bring it up. MT(which is still around so I don't get the "years ago" comment) doesn't do anything without templates being in place, either. You can create content, obviously, but it won't display anything without. Any reasonably-capable CMS will allow you to scrap any existing templating and start clean, if you want. – Su' Sep 25 '12 at 18:37
Thank you. I will look again. I know MovableType is still available, but it all seemed a lot more complex than I remember it. Maybe I'm just losing it? :) – Mark Sep 25 '12 at 18:47
This question is not just another "recommend a CMS to me" -- this is a more specific "I am looking for a CMS with templates that are more readable, and specifically something more like CityDesk or MovableType." I disagree that this question is an exact duplicate. – artlung Sep 25 '12 at 22:54

You can always start with wordpress and very basic framework/boilerplate template meant for building your own. For example:

Or maybe you just want a PHP framework to play around with like FuelPHP or codeigniter or Yii

share|improve this answer

You can put together a very simple CMS quickly with a PHP framework, most of the frameworks have some sort of "create a blog in 5 minutes" type of tutorial that should allow you to try several and pick the one that suits you best.

As far as the code you wrote above Wordpress does this, as well as others I'm sure. It also lets you change layouts of the data on a per category or per page basis. It is however, run from the theme folder.

share|improve this answer

Someone suggested WordPress - This is clearly not as clean as your example, but it's not all that worse, really. Here's the code:

$args = array(
    'numberposts'     => 5,
    'offset'          => 0,
    'orderby'         => 'post_date',
    'order'           => 'DESC',
    'post_type'       => 'post',
    'post_status'     => 'publish',
$posts_array = get_posts( $args );
foreach( $posts_array as $post ): setup_postdata($post); ?>
    <div class="articleTitle"><?php the_title(); ?></div>
    <div class="articleBody"><?php the_content() ?></div>
<?php endforeach; ?>

It's readable to me, but my bias for working with WordPress is I've done most of my work in it. I've also worked with SilverStripe, drupal, and Joomla templates, and none are perfect, WordPress is pretty robust. The documentation is pretty good too. Your mileage will vary a great deal based on the specific requirements you have. All the CMSs out there have differing ways to look at things, and all require a learning curve.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.