LightWeight Content System (LCS)

Making the style dynamic

In our example, we made the title and description dynamic. Now let’s think about the style. In our example, there are only 2 elements defined. So let’s replace the whole “<style>” section with<?php LCSInsertExternalStyle(“MAIN_STYLE”); ?>. Like the title, you can now edit your page style in the backoffice.

CSSMate is included in the backoffice, so you can also preview the style you will be using. LCSInsertExternalStyle will insert a link to a stylesheet, however if you want to keep your style embedded within the page, you can use LCSInsertStyle instead.

Content and structures

Our page has now dynamic variables, and dynamic style. The last thing we need to insert is the content.
In a similar way, there are several API function that will allow you to retrieve an item’s content, or the site structure itself. Check the API documentation for more info.


Downloads and more info available on this page.

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 *