Vinoteca: модуль, шаблон и компоненты интернет-магазина вина на 1С-Битрикс

This commit is contained in:
jimagie committed 2026-10-22 19:28:52 +05:00
commit bb7d8af290
469 files changed
+26426

No files matched your search

@@ -0,0 +1,39 @@
<?php
use Bitrix\Main\Localization\Loc;
if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) {
die();
}
$requested = \Bitrix\Main\Context::getCurrent()->getRequest()->getQuery("PAGEN_1");
$page = 1;
if ($requested !== null) {
if ($requested === "1") {
LocalRedirect(VINO_HOST . \Jinove\Vinoteca\News::folder(), true, "301 Moved Permanently");
}
if (!is_string($requested) || !ctype_digit($requested) || (int)$requested < 2 || (int)$requested > \Jinove\Vinoteca\News::pageCount()) {
\Bitrix\Iblock\Component\Tools::process404("", true, true, true);
return;
}
$page = (int)$requested;
}
$meta = \Jinove\Vinoteca\News::pageMeta($page);
$APPLICATION->SetTitle(Loc::getMessage("VINO_NEWS_HEADING"));
$APPLICATION->SetPageProperty("title", $meta["title"]);
$APPLICATION->SetPageProperty("description", $meta["description"]);
if ($page > 1) {
$APPLICATION->SetPageProperty("vino_canonical", $meta["canonical"]);
}
?>
<section class="vino-razdel-hero">
<div class="vino-wrap">
<?php \Jinove\Vinoteca\Breadcrumbs::show(array(array(Loc::getMessage("VINO_NEWS_H1")))); ?>
<h1 class="vino-razdel-hero__title"><?= Loc::getMessage("VINO_NEWS_HEADING") ?></h1>
</div>
</section>
<section class="vino-news-feed">
<div class="vino-wrap">
<?php $APPLICATION->IncludeComponent("bitrix:news.list", \Jinove\Vinoteca\News::LIST_TEMPLATE, \Jinove\Vinoteca\News::listParams(), $component); ?>
</div>
</section>