Answer the question
In order to leave comments, you need to log in
[[+content_image]]
Can I set my own template in Bitrix news and other components?
Many CMS sin with their layout, and the inability to change it.
MODX revo is not one of those. In it, you can set your own template for any component.
For example, chl.crumbs:
[[pdoCrumbs?
&tpl=`@INLINE <li><a href="[[+link]]#catalog">[[+menutitle]]</a></li>` // template link
&tplCurrent=`@INLINE <li class="active">[[+menutitle]]</li>` //template current
&tplWrapper=`@INLINE <ol class="breadcrumb">[[+output]]</ol>` //template wrapper
&outputSeparator=`` //razdelitel
&showHome=`1` //def="0" show home page
]]
<?$APPLICATION->IncludeComponent(
"bitrix:news.list",
"",
Array(
"CACHE_TYPE" => "N",
"DISPLAY_DATE" => "N",
"DISPLAY_TOP_PAGER" => "N",
"DISPLAY_BOTTOM_PAGER" => "N",
"GLOBAL_ACTIVE" => "N",
"IBLOCK_ID" => "[id]",
"IBLOCK_TYPE" => "news",
"AJAX_OPTION_STYLE" => "N",
"NEWS_COUNT" => "6",
"PROPERTY_CODE" => Array("DESCRIPTION"),
"PAGER_DESC_NUMBERING" => "N",
"SORT_BY1" => "RAND",
"SORT_ORDER1" => "RAND",
"SORT_BY2" => "RAND",
"SORT_ORDER2" => "RAND",
"tpl" => "путь для файла, в котором мой PHP код"
)
);
?>
Answer the question
In order to leave comments, you need to log in
Of course it is possible. But I will send you to official courses for details , there is no point in retelling them.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question