Using Wiki to Create Tables

One limitation of CMSimple‘s built in editor is the lack of a simple table editor to create tables with or without borders (columns of data). You can, however use the playground on this (or another) wiki to create your tables.

  • Go to the sandbox and start to edit.
  • Type in your text in the wiki markup syntax.
^Non aligned^Left aligned  ^  Center aligned  ^  Right aligned^
|Bike|Train  |  Glider  |  Car|
|55|63  |  23  |  78|
|Merged ||  17  |  1.07|

... and hit Preview which shows the following ...

Non alignedLeft aligned Center aligned Right aligned
BikeTrain Glider Car
5563 23 78
Merged 17 1.07

Note how the leading or trailing double spaces within a cell define the alignment. You can cut’n’paste the finished table from the wiki into your CMSimple page. Since you have only pressed the Preview button your work will not be saved on the wiki site.

Edit your CSS stylesheet to include the following

.leftalign {text-align:left;}
.centeralign {text-align:center;}
.rightalign {text-align:right;}
.leftalign, .centeralign, .rightalign {font-size:10pt;}

to make the wiki align styles work.

Multilanguage titles in template

Webmaster may often need to have titles written in a template. It is simple HTML topic on one language page. But if there is a need to have any 2nd language, there might be a problem for those not very familiar with CMSimple and PHP. There are various ways. This one may be the simple one: 1. In your language file (cmsimple/languages) define a variable for each label you use in your template. e.g.:

$tx['label']['your_label_1']="Your Label 1";
$tx['label']['your_label_2']="Your Label 2";
$tx['label']['your_label_3']="Your Label 3";

2. Use these variables in your template on desired places. e.g.:

<table>
<tr>
<td><?php echo $tx['label']['your_label_1'];?></td>
<td><?php echo $tx['label']['your_label_2'];?></td>
<td><?php echo $tx['label']['your_label_3'];?></td>
</tr>
</table>
tips_and_tricks/using_wiki_to_create_tables.txt · Last modified: 2008/08/14 20:42 by tata
chimeric.de = chi`s home Creative Commons License Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0