Answer the question
In order to leave comments, you need to log in
How to display only current tags on the detailed one in Bitrix, only for this news?
They are not displayed.
In fact, they should work fine, according to the mind. otherwise it is not clear on k.h. The developers put it in there.
I know how to implement a similar component through a custom property, but this is not correct because the same tags will be there too.
Tried like this
<?foreach($arResult["FIELDS"] as $arResult["ELEMENT"]["TAGS_LIST"]):?>
Тэги: <?=$value;?>
<?endforeach;?>
<?
$arrTags = explode(',', $arResult["ELEMENT"]["TAGS_LIST"]);
$count = count($arrTags);
$i = 0;
foreach($arrTags as $value):
$i++;
$value = trim($value);
echo '<a href="/search/?tags='.str_replace(' ', '+', $value).'">'.$value.'</a>';
if($i != $count) echo ', ';
endforeach;
?>
<?$APPLICATION->IncludeComponent(
"bitrix:search.tags.cloud",
"TAGS",
array(
"FONT_MAX" => "25",
"FONT_MIN" => "12",
"COLOR_NEW" => "8FA4BA",
"COLOR_OLD" => "2775C7",
"PERIOD_NEW_TAGS" => "",
"SHOW_CHAIN" => "Y",
"COLOR_TYPE" => "Y",
"WIDTH" => "100%",
"SORT" => "NAME",
"PAGE_ELEMENTS" => "150",
"PERIOD" => "",
"URL_SEARCH" => "/search/index.php",
"TAGS_INHERIT" => "Y",
"CHECK_DATES" => "N",
"arrFILTER" => Array("iblock_news"),
"CACHE_TYPE" => "A",
"CACHE_TIME" => "3600",
"arrFILTER_iblock_articles" => "all"
),
false
);?>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question