So you just created this huge number of HTML documents - then you realize that those horizontal lines do not fit the layout on half of your site! Does this sound familiar to you at all?
With phpCMS you can avoid situations like the one described above by using TAG files.
You simply define your own TAGS in the TAG file, thats all. From now on you can use your custom TAGS in your content and template files. If later on you decide you want to replace some TAGs with different HTML, all you need to do is modify the definition in the tag file.
A TAG file is a normal text file. You may define only one TAG file per project, but you can divide your site into several projects.
Within a TAG file commented lines are those that begin with a semicolon (;). Blanks and tabus are not interpreted. So, for easier reading, you may format your TAG files with as many tabs as you like.
A definition lines contains your TAG, the separator ":=" (without quotes) and behind this the HTML tags you want to replace with your own TAG. A Line in a TAG file looks e.g. in that way:
<PICTUREFRAME> := <table border="0" cellspacing="0" cellpadding="2">
Tip: You may replace diacritics (e.g. German "umlaute" or accented characters) by their equivalent HTML tags. This makes content files much easier to read. :-)
You can use parameters with you custom TAGS as well. Have a look at the following line:
<a "$url,$target,$text"> := <a href="$url" target="$target">$text</a>
Each value in the comma separated list of values is placed into the HTML on the right.
NOTE: TAGS use commas as delimeters for parameters.
You may not use commas within parameter values since these would be interpreted as delimeters of the parameter list. Single straight quotes ( ' ) are also used as delimeters and must not be used within parameter values.
Using TAGS is as easy as writing a HTML tag, so there is not much to say.
The phpCMS parser replaces the TAG with the HTML tags defined behind your own TAG.
Since learning by example is much easier look at this example TAG file:
|
Here is how you use these tags in a content file:
<IMPORTANT>Tip:</IMPORTANT> Use TAGS as often as possible!
phpCMS replaces the TAG "<IMPORTANT>" with the HTML defined behind the separator. In a Browser the above line looks like this:
Tip: Use TAGS as often as possible!
Now let's assume just bolding your important words is not what you really wanted. Simply open the TAG file and edit your custom difinition:
|
And now the important word from above will be displayed thus:
Tip: Use TAGS as often as possible!
As you can see: phpCMS is really easy to use!