@b[] ^if($uUri eq '$MAIN:PARSER_SITE_ROOT/'){ ^Site:301[$MAIN:SITE_ROOT/] }{ ^if($Categories.current){ ^_b[] }{ ^404[] } } @_b[] ^print_content[] @print_content[][locals] $uri[^request:uri.match[^^$MAIN:SITE_ROOT/index.php][i]{}] $uri[^uri.split[?;lh]] $uri[$uri.0] $uri[^uri.trim[both;/]] $uri[^uri.split[/;lh]] ^breadCrumbs.append{$Categories.current.title $Categories.current.url} $oneUri[$uri.1] ^if($Categories.currentSub){ $oneUri[$uri.2] ^breadCrumbs.append{$Categories.currentSub.name $Categories.current.url} } $isOne(def $oneUri) ^if($isOne){ $id[^oneUri.split[-;lh]] $id(^id.0.int(0)) } #^dstop[$Categories] $News[^News::get[ $.categoryId($Categories.current.categoryId) $.subCategory[$Categories.currentSub] ^if($isOne){ $.id($id) }{ $.limit(20) } ]] $title[^if($Categories.currentSub){$Categories.currentSub.name;$Categories.current.title}] $MAIN:sTitle[$title] $code[^if($News){ ^if($isOne){ ^use[_mod/news_one.p] }{ ^aaa::print[ $.type[top] $.categoryId($Categories.current.id) $.limit(1) ] ^print_promo_top[]

Новости

^use[_mod/news_list.p] } ^mod_code[$News] ^if(!$isOne){ ^print_promo_bottom[] }{ ^print_promo_after_comments[] } }{ ^404[] }]

$MAIN:sTitle

^printBreadCrumbs[2]
$code