borisych писал(а):
Как в макете это показать, я знаю
Если знаете то выкладывайте Ваши знание что бы мы могли посмотреть. Но Вы также можете добавить Теги в контроллер ИС:
borisych писал(а):
Мне нужно просто перед списком инфоэлементов вывести обалко тэгов этой ИС.
if ($Informationsystem_Controller_Show->item == 0)
{
$Info_tags = Core_Entity::factory('Tag');
$Info_tags->queryBuilder()
->select(array('COUNT(tag_id)', 'count'), 'tags.*')
->join('tag_informationsystem_items', 'tag_informationsystem_items.tag_id', '=', 'tags.id')
->join('informationsystem_items', 'tag_informationsystem_items.informationsystem_item_id', '=', 'informationsystem_items.id')
->where('informationsystem_items.informationsystem_id', '=',Core_Array::get(Core_Page::instance()->libParams, 'informationsystemId'))
->where('informationsystem_items.deleted', '=', 0)
->where('tags.deleted', '=', 0)
->groupBy('tag_informationsystem_items.tag_id')
->having('count', '>', 0);
$Info_tags = $Info_tags->findAll(FALSE);
$oTags = Core::factory('Core_Xml_Entity')->name('info_tags');
if (count($Info_tags)) {
foreach ($Info_tags as $oInfo_tag) {
$oTags->addEntity(
$oInfo_tag->clearEntities()
);
}
}
$Informationsystem_Controller_Show->addEntity($oTags);
}
borisych писал(а):
А вот как в XSL?
Думаю вы теперь знаете.
<xsl:if test="count(info_tags) > 0">
<xsl:apply-templates select="info_tags/tag"/>
</xsl:if>