Skip to content

Instantly share code, notes, and snippets.

@EvilWolf EvilWolf/header.php

Last active Oct 11, 2017
What would you like to do?
Заголовок шаблона для Битрикс
use Bitrix\Main\Page\Asset;
$AssetManager = Asset::getInstance();
<!DOCTYPE html>
<html lang="ru">
<meta charset="UTF-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title><? $APPLICATION->ShowTitle()?></title>
// Assets
// 0. Fonts
$AssetManager->addString('<link href=",400i,700,700i&amp;subset=cyrillic" rel="stylesheet">');
// 1. Stylesheet
$AssetManager->addCss(SITE_TEMPLATE_PATH . '/css/normalize.css');
$AssetManager->addCss(SITE_TEMPLATE_PATH . '/css/grid.css');
$AssetManager->addCss(SITE_TEMPLATE_PATH . '/css/main.css');
// 2. Libraries and Scripts
// jQuery and Modernizr
$AssetManager->addString('<script src=""></script>');
$AssetManager->addString('<script src=""></script>');
// flickity
$AssetManager->addString('<link rel="stylesheet" href="">');
$AssetManager->addString('<script src=""></script>');
$AssetManager->addJs(SITE_TEMPLATE_PATH . '/js/main.js');
// 3. Join BX and head
CJSCore::Init(array("fx")); // fix BX not defined;
<? $APPLICATION->ShowPanel() ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.