LightWeight Content System (LCS)

Getting Started

Once the admin panel is ready, you can start creating your website. Using your favorite editor, create a first page. For instance:

<html>
   <head>
      <title>A nice test title</title>
      <meta name="description" content="fake description" />
      <style type="text/css">
         BODY {background-color:#EEEEEE;}
         P {font-family:Geneva, Arial, Helvetica, sans-serif;}
      </style>
   </head>
   <body>
      <h1>Big Title</h1>
      <p>My Page content</p>
   </body>
</html>

As you can see, it is a very simple page with a bit of CSS. All you have to do now is to make it dynamic. In order to do this, change your test page extension to php, and add the following lines before “<html>”:

<?php
include (“api/lcs.inc.php”);
LCSInit();
?>

From now, you can use all the LCS API functions in your page. Let’s start with something simple : in our example, replace the title (“A nice test title”) by <?php echo LCSGetVar(“SITE_TITLE”);?>, and the keywords by <?php echo LCSGetVar(“SITE_KEYWORDS”);?>

By doing this, the title and description of your page will be retrieved from LCS, and you will be able to modify them in the backoffice.

This is of course very basic, but everything will work like this, from styles to PHP subscripts.

5 thoughts on “LightWeight Content System (LCS)

  1. Sympa 🙂

    What I see is that a traditional CMS pretty much never asks you to code your pages, the whole admin panel has everything needed for it, including the style customization.

    With LCS, you get a library, an API, in order to code your pages. It’s a CMS for programmers.

    Well, that said, I just read the article and didn’t test LCS, so I don’t really know if LCS does also provide more classical ways to build your website without actually coding in php/html.

    Sinon ça va la vie ? 🙂

  2. Hi Droune

    I’m indeed behind LCS. However, I slightly disagree: it’s definitely easier for programmers, but the main idea is to let the user create his website with only little knowledge of the system. (the API help should be enough).

    I tried several CMS, and there are plenty of really cool features, but everytime I had to understand at least the theming system to be able to achieve what I wanted.

    With LCS, you start with your simple HTML/css model (maybe I’m the only one doing this, but I always start a new website project with a simple html page to see how it’ll look), then replace what you want to dynamize with LCS calls.

    Anyway, thanks for the feedbacks:-)

  3. I should give it a try, because:

    1 – I code my html pages with notepad directly in html/php with a css file
    2 – I don’t like Databases
    3 – I don’t want to install an enormous when I just want a few dynamic pages.

  4. This is precisely why I wrote LCS. Particularly for small to medium sites, I didn’t feel like installing a big CMS. And I guess most of programmers have the same approach (notepad + simple model).
    If ever you try it, don’t hesitate to post your feedbacks. LCS isn’t perfect, however I’d like to improve it, and another point of view won’t hurt.

Leave a Reply

Your email address will not be published. Required fields are marked *