{layout name="layout"/} {php} use app\model\Article; use app\model\Category; $childrenMenu = Category::getChildrenByParentId(Category::CATEGORY_COMPANY); $items = Article::getList(Category::CATEGORY_COMPANY_EVENT, 1000); $items = $items->toArray(); $items = $items['data']; $years = array_unique(array_column($items, 'title')); rsort($years); $yearList = []; foreach ($items as $item) { foreach($years as $year) { if (!isset($yearList[$item['title']])) { $yearList[$item['title']] = []; } if (!isset($yearList[$item['title']][$item['sub_title']])) { $yearList[$item['title']][$item['sub_title']] = []; } $yearList[$item['title']][$item['sub_title']] = $item; } } //dd($yearList[2022]);exit; {/php} {include file="public/about_second" /}
{$blocks['company_event']['value']}
{$blocks['company_event']['title']} {$blocks['company_event_desc']['value']|raw}