Сделала все как в пользовательской документации - создала инфоблок, в нем сделала разделы с темами. В настройках компонента поставила галочку "выводить материалы по теме" и выбрала инфоблоки, откуда будет выводиться. В итоге, на детальной новости у меня в выводе материалов по теме просто ссылка, на ту же новость ,что выше...что я сделала не так?
вид детальной новости
http://dorinfo.ru/star_detail.php?ELEMENT_ID=2434
код инфоблока новостей
вид детальной новости
код инфоблока новостей
Код |
---|
<?$APPLICATION->IncludeComponent("bitrix:news", "News_glavn", array( "IBLOCK_TYPE" => "news", "IBLOCK_ID" => "19", "NEWS_COUNT" => "12", "USE_SEARCH" => "N", "USE_RSS" => "N", "USE_RATING" => "N", "USE_CATEGORIES" => "Y", "CATEGORY_IBLOCK" => array( 0 => "18", 1 => "19", 2 => "20", 3 => "2", 4 => "22", ), "CATEGORY_CODE" => "THEMES", "CATEGORY_ITEMS_COUNT" => "12", "CATEGORY_THEME_18" => "list", "CATEGORY_THEME_19" => "list", "CATEGORY_THEME_20" => "list", "CATEGORY_THEME_2" => "list", "CATEGORY_THEME_22" => "list", "USE_REVIEW" => "Y", "MESSAGES_PER_PAGE" => "10", "USE_CAPTCHA" => "Y", "REVIEW_AJAX_POST" => "N", "PATH_TO_SMILE" => "/bitrix/images/forum/smile/", "FORUM_ID" => "18", "URL_TEMPLATES_READ" => "/forum/index.php?PAGE_NAME=message&FID=#FORUM_ID#&TID=#TOPIC_ID#&MID=#MESSAGE_ID#", "SHOW_LINK_TO_FORUM" => "Y", "POST_FIRST_MESSAGE" => "Y", "USE_FILTER" => "N", "SORT_BY1" => "ACTIVE_FROM", "SORT_ORDER1" => "DESC", "SORT_BY2" => "SORT", "SORT_ORDER2" => "ASC", "CHECK_DATES" => "Y", "SEF_MODE" => "Y", "SEF_FOLDER" => "/", "AJAX_MODE" => "N", "AJAX_OPTION_JUMP" => "N", "AJAX_OPTION_STYLE" => "Y", "AJAX_OPTION_HISTORY" => "N", "CACHE_TYPE" => "A", "CACHE_TIME" => "36000000", "CACHE_FILTER" => "N", "CACHE_GROUPS" => "N", "SET_TITLE" => "Y", "SET_STATUS_404" => "N", "INCLUDE_IBLOCK_INTO_CHAIN" => "N", "ADD_SECTIONS_CHAIN" => "N", "USE_PERMISSIONS" => "N", "PREVIEW_TRUNCATE_LEN" => "150", "LIST_ACTIVE_DATE_FORMAT" => "d.m.Y", "LIST_FIELD_CODE" => array( 0 => "", 1 => "", ), "LIST_PROPERTY_CODE" => array( 0 => "", 1 => "", ), "HIDE_LINK_WHEN_NO_DETAIL" => "N", "DISPLAY_NAME" => "N", "META_KEYWORDS" => "-", "META_DESCRIPTION" => "-", "BROWSER_TITLE" => "NAME", "DETAIL_ACTIVE_DATE_FORMAT" => "d-m-Y", "DETAIL_FIELD_CODE" => array( 0 => "", 1 => "", ), "DETAIL_PROPERTY_CODE" => array( 0 => "", 1 => "", ), "DETAIL_DISPLAY_TOP_PAGER" => "N", "DETAIL_DISPLAY_BOTTOM_PAGER" => "Y", "DETAIL_PAGER_TITLE" => "Страница", "DETAIL_PAGER_TEMPLATE" => "", "DETAIL_PAGER_SHOW_ALL" => "N", "DISPLAY_TOP_PAGER" => "N", "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", "DISPLAY_DATE" => "Y", "DISPLAY_PICTURE" => "N", "DISPLAY_PREVIEW_TEXT" => "Y", "USE_SHARE" => "Y", "SHARE_HIDE" => "N", "SHARE_TEMPLATE" => "", "SHARE_HANDLERS" => array( 0 => "facebook", 1 => "lj", 2 => "vk", 3 => "twitter", ), "SHARE_SHORTEN_URL_LOGIN" => "", "SHARE_SHORTEN_URL_KEY" => "", "AJAX_OPTION_ADDITIONAL" => "", "SEF_URL_TEMPLATES" => array( "news" => "", "section" => "", "detail" => "star_detail.php?ELEMENT_ID=#ELEMENT_ID#", ), "VARIABLE_ALIASES" => array( "detail" => array( "ELEMENT_ID" => "ELEMENT_ID", ), ) ), false );?> |