Добро пожаловать на форум PHP программистов!
За последние 24 часа нас посетили 17216 программистов и 1838 роботов. Сейчас ищут 1537 программистов ...

Defining blocks

Вернуться к: HTML_Template_PHPLIB

If you want to re-use certains parts of your HTML code multiple times, e.g. rows in a table, you can define blocks as described in the example above.

Blocks are not automatically detected, they need to be defined explicitely via the setBlock() method. The method takes the handle of the file in which the block is located as first parameter, the name of the block as written in the file as second and the new block handle as third parameter.

Defining a block

<?php
$t
->setBlock('authors''authorline''authorline_ref');
?>

In the example template (available as handle authors), a block named authorline is defined. The handle of the block is now authorline_ref.



Вернуться к: HTML_Template_PHPLIB

© 2024 «PHP.RU — Сообщество PHP-Программистов»
Главная | Форум | Реклама на сайте | Контакты VIP Сувениры
Разработка компании ODware