I
I
Ilias Martis2014-06-17 11:28:00
PHP
Ilias Martis, 2014-06-17 11:28:00

Component 1C Bitrix bitrix:catalog, how to make it in the form of tiles?

Good afternoon. I started to deal with this monster here and a task arose, to make the list of catalog products not a list (party girl) but in the form of tiles.
The display of sections and subsections is already shown as tiles, but how to make the list of positions in the catalog the same tiles ?!
At the root of the site there is a catalog folder, it contains this index.php

<?
require($_SERVER["DOCUMENT_ROOT"]."/bitrix/header.php");
$APPLICATION->SetTitle("Êàòàëîã îáîðóäîâàíèÿ");
?><!--a href="/catalog/subscribe.php" >Ïåðåéòè ê ïîäïèñêå íà ðàññûëêó</a--> 
<?$APPLICATION->IncludeComponent("bitrix:catalog", "catalog_sections", array(
    "VIEW_MODE" => "TILE",
    "PRODUCT_DISPLAY_MODE" => "N",
  "IBLOCK_TYPE" => "Content",
  "IBLOCK_ID" => "3",
  "BASKET_URL" => "/personal/basket.php",
  "ACTION_VARIABLE" => "action",
  "PRODUCT_ID_VARIABLE" => "id",
  "SECTION_ID_VARIABLE" => "SECTION_ID",
  "SEF_MODE" => "Y",
  "SEF_FOLDER" => "/catalog/",
  "AJAX_MODE" => "N",
  "AJAX_OPTION_SHADOW" => "Y",
  "AJAX_OPTION_JUMP" => "N",
  "AJAX_OPTION_STYLE" => "N",
  "AJAX_OPTION_HISTORY" => "N",
  "CACHE_TYPE" => "N",
  "CACHE_TIME" => "3600",
  "CACHE_FILTER" => "N",
  "CACHE_GROUPS" => "Y",
  "SET_TITLE" => "Y",
  "SET_STATUS_404" => "Y",
  "USE_FILTER" => "N",
  "USE_REVIEW" => "N",
  "USE_COMPARE" => "N",
  "PRICE_CODE" => array(
        ),
  "USE_PRICE_COUNT" => "Y",
  "SHOW_PRICE_COUNT" => "1",
  "PRICE_VAT_INCLUDE" => "Y",
  "PRICE_VAT_SHOW_VALUE" => "N",
  "SHOW_TOP_ELEMENTS" => "N",
  "PAGE_ELEMENT_COUNT" => "50",
  "LINE_ELEMENT_COUNT" => "3",
  "ELEMENT_SORT_FIELD" => "sort",
  "ELEMENT_SORT_ORDER" => "asc",
  "LIST_PROPERTY_CODE" => array(
    0 => "addit",
    1 => "",
  ),
  "INCLUDE_SUBSECTIONS" => "N",
  "LIST_META_KEYWORDS" => "-",
  "LIST_META_DESCRIPTION" => "UF_DESCR",
  "LIST_BROWSER_TITLE" => "NAME",
  "DETAIL_PROPERTY_CODE" => array(
    0 => "",
    1 => "",
  ),
  "DETAIL_META_KEYWORDS" => "-",
  "DETAIL_META_DESCRIPTION" => "-",
  "DETAIL_BROWSER_TITLE" => "NAME",
  "LINK_IBLOCK_TYPE" => "",
  "LINK_IBLOCK_ID" => "",
  "LINK_PROPERTY_SID" => "",
  "LINK_ELEMENTS_URL" => "link.php?PARENT_ELEMENT_ID=#ELEMENT_ID#",
  "DISPLAY_TOP_PAGER" => "Y",
  "DISPLAY_BOTTOM_PAGER" => "N",
  "PAGER_TITLE" => "Òîâàðû",
  "PAGER_SHOW_ALWAYS" => "N",
  "PAGER_TEMPLATE" => "",
  "PAGER_DESC_NUMBERING" => "N",
  "PAGER_DESC_NUMBERING_CACHE_TIME" => "36000",
  "PAGER_SHOW_ALL" => "N",
  "AJAX_OPTION_ADDITIONAL" => "",
  "SEF_URL_TEMPLATES" => array(
    "sections" => "#SECTION_CODE#/",
    "section" => "#SECTION_CODE#/goods/",
    "element" => "#SECTION_CODE#/#ELEMENT_CODE#/",
    "compare" => "compare.php?action=#ACTION_CODE#",
  ),
  "VARIABLE_ALIASES" => array(
    "compare" => array(
      "ACTION_CODE" => "action",
    ),
  )
  ),
  false
);?> 
<?require($_SERVER["DOCUMENT_ROOT"]."/bitrix/footer.php");?>

After reading the dock on the component set "SECTIONS_VIEW_MODE" => "TILE", but it didn't help.. :(
Help me figure out which steppe to pick?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Misha Vasilyev, 2014-06-17
@weboff-ru

In order to tile output, you must have a template in which tile output occurs.
On your server, along the path from the site root /bitrix/templates/<Name of your template>/components/bitrix/catalog/catalog_sections, there is a complex component template.
Go to section.php there - it is responsible for displaying the contents of the section. There you will see a code like
Instead of template_name there will be something else. This something is the name of the template that is used when displaying the contents of the section. Available templates for a complex component, without going into details, are located at the address from the site root /bitrix/templates/<Name of your template>/components/bitrix/catalog/catalog_sections/bitrix/catalog.section/
See what templates are there. If you don't have what you're looking for, you'll need to write your own.

D
Dmitry Grebenshchikov, 2014-06-17
@iMeath

Well, just do you need to change the template, not change the component settings! And what you added is applicable only for the .default and visual template
As we can see, you have the catalog_sections template

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question