Несколько тегов, разделённых запятой, означают логическое И между ними. Вы также можете использовать точку с запятой в качестве логического ИЛИ. И имеет высший приоритет над ИЛИ. Вы не можете использовать скобки для группировки условий. Звёздочка (*) внутри тега используется в качестве маски для "подстроки".
Разделы: Документация / Расширяем Cotonti / Расширения
Каждый, кому приходилось создавать или изменять шаблоны Cotonti, видел и использовал шаблон теги. Теги - это короткие кусочки кода, которые при разборе (парсинге) системой XTemplate, замененяются на блок HTML-кода. Это обеспечивает существование файла шаблона только в виде HTML-кода. Любой код, сгенерированный PHP, поддерживается с помощью плагина и анализируется с помощью тега.
При разработке плагина, важно знать, как определять теги и условные блоки в системе XTemplate. Раньше большинство...
Разделы: Documentation / Extending Cotonti / Themes
This document covers features, statements and their syntax supported by CoTemplate v.2.7 and later.
Blocks are the largest elements in the template's structure. Templates consist of blocks, blocks consist of other blocks, statements, tags and raw text. Here is the block syntax:
<!-- BEGIN: BLOCK_NAME --> Block HTML contents here <!-- END: BLOCK_NAME -->
Most templates have one root-level block named MAIN, but multiple root-level blocks in one template file are allowed. HTML...
Разделы: Documentation / Extending Cotonti / Themes
Since Cotonti 0.9.1 a new set of debugging facilities is available to template designers.
The first one is block/tags listing mode. It outputs a plain tree of blocks and assigned tags in them for the current page. Example:
To get such a debug page, you need to make sure debug_mode is enabled for your Cotonti instance first. Open datas/config.php and make sure you have debug_mode enabled:
$cfg['debug_mode'] = TRUE;
Then you can see a TPL dump of any page by simply appending tpl_debug=1...
Разделы: Documentation / Extending Cotonti / Themes
CoTemplate is a template engine allows you to store HTML code separately from your PHP code (as opposed to many other template engines, like Samrty do). CoTemplate based on XTemplate class — a fast and lightweight block template engine, but extends it with many useful features such as nested blocks, various kinds of variable interpolation, callbacks, etc. and still is very short and very optimized.
CoTemplate is using blocks for outputting HTML code....
Разделы: Documentation / Extending Cotonti / Extensions
Those familiar with building or modifying Cotonti templates will have seen and used template tags. Tags are short bits of code which, when parsed by XTemplate, are replaced by a block of HTML code. This ensures your template file exists only of HTML code. Any PHP generated code is handled by the plugin and parsed using a tag.
When developing a plugin, it’s important to know how to define tags and conditional blocks with the XTemplate system. Before, most plugins used the legacy way of getting...
Разделы: Documentation (Genoa and older) / English / Skins
You can include another .tpl file in the theme files using this code:
{FILE "themes/YOUR_THEME/myfile.tpl"}
We're gonna create reminder.tpl and put it in themes/mytheme folder.
This is the code:
<div class="block">
<img src="theme/{PHP.theme}/img/newsletter.png" width="64" height="64" alt="" />
Please, don't forget to s...