Target CMS (TCMS) is an HTML page building system for PHP programmers, and also a content management system for editors. It's very well suited for sites that have many different types of page each requiring different themes and templates.
In TCMS all files are 100% object-oriented PHP. No messy HTML tags and no cumbersome meta-file syntax to learn. You use your programming skills to describe the block structure of each page with a set of simple PHP class objects, each one encapsulating all the characteristics of an HTML tag such as DIV, P, H2 or IMG. These PHP scripts are more readable than HTML, often more concise and much less prone to errors.
In these pages we assume you have already used our tutorial in the Editors section to build yourself a test website. If you haven't done this we strongly recommend it as it will only take a couple of hours and you'll get a much better idea of what TCMS is all about before getting into the PHP. We give you a free personal website to play with for as long as you need, with help from us available online. This is a much quicker way to evaluate our product than having to download and install it before even being able to test it, as is the case with other CMS systems.
The structure of a website
Most people are used to seeing a web page as a single entity and have no reason to analyse its structure. If you look at the page source there's nothing to imply a particular methodology used in its creation, other than the modern practice to separate content from layout by the use of stylesheets. Most page building tools view the page as a blank canvas on which items can be placed according to the wishes of the designer.
But there is another way to view a page; it can be seen as a hierarchy of nested blocks. Referring to the illustration we used in the Editors section, here's one way of looking at the structure of the page you're reading:
The gray box represents the main page area, which in this case is a fixed-width panel set in the middle of the window. The yellow box at the top is the masthead, the green box on the left is the menu and the rust-coloured boxes are the content pages.
This is one of the most common page formats found in websites. Even though sites may look very different the basic structure reduces to this same three-panel format. Of course there may be a couple of extra blocks such as a toolbar below the masthead and a credits panel at the bottom of the page, but even with these extras the page structure is pretty simple.
Other common formats are
- Same thing but with the menu on the right
- Single content panel with toolbar instead of menu
- Three columns with boxes in each.
Together these three formats probably account for 95% of websites today. There are additionally special blocks such as for weather forecasts and advertising.
Block by block
When you break down a page into blocks you soon discover that the blocks are essentially independent of each other. This means that once you've defined the behaviour and appearance of a block you can use it pretty well anywhere as long as there's space for it. Some blocks do little more than contain others, and each can have its own independent set of style definitions.
TCMS works by using a PHP class for each block. The class represents some kind of HTML container - usually a DIV - and its code generates the HTML for itself and for any other blocks it contains. To support this structure we use a set of PHP class libraries that avoid the need to work with HTML tags; the program is dealing solely with a conceptual model of the block. Full documentation is available for the libraries, which are quite easy to use.