A
A
Alexander Ivanov2016-04-18 17:29:15
1C-Bitrix
Alexander Ivanov, 2016-04-18 17:29:15

How to set up bitrix:news.calendar?

My component

<?$APPLICATION->IncludeComponent(
  "bitrix:news.calendar", 
  ".default", 
  array(
    "AJAX_MODE" => "Y",
    "AJAX_OPTION_ADDITIONAL" => "",
    "AJAX_OPTION_HISTORY" => "Y",
    "AJAX_OPTION_JUMP" => "Y",
    "AJAX_OPTION_STYLE" => "Y",
    "CACHE_TIME" => "36000000",
    "CACHE_TYPE" => "A",
    "COMPONENT_TEMPLATE" => ".default",
    "DATE_FIELD" => "DATE_ACTIVE_FROM",
    "DETAIL_URL" => "",
    "IBLOCK_ID" => "29",
    "IBLOCK_TYPE" => "calendar",
    "MONTH_VAR_NAME" => "month",
    "NEWS_COUNT" => "0",
    "SET_TITLE" => "Y",
    "SHOW_CURRENT_DATE" => "Y",
    "SHOW_MONTH_LIST" => "Y",
    "SHOW_TIME" => "Y",
    "SHOW_YEAR" => "Y",
    "TITLE_LEN" => "0",
    "TYPE" => "NEWS",
    "WEEK_START" => "1",
    "YEAR_VAR_NAME" => "year"
  ),
  false
);?>

By default, the month arrows work on this url:
?month=05&year=2016
how to make the url on switch like "/2016/05/"?
example www.bazaar.ru/events/2016/05/19
In this example, the same component is only changed a lot, I'm trying to understand its logic and repeat it.
Part with date:
/events/<?=$arResult["currentYear"]?>/<?=$arResult["currentMonth"]?>/<?=$arDay["day"]?>/" class="event-link">
<?=$arDay["day"]?></a><?//=$arDay["events"][0]["url"]?>   <?else:?>     
 <span><?=$arDay["day"]?></span>  
 <?endif;?></td>

It remains to deal with the switches . They suggested
that something like this can be reconfigured:
http://site address/bitrix/admin/urlrewrite_list.php...
But it's not entirely clear how to set up exactly news.calendar there, it's clear with detailed news, but with news. calendar is not very good

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question