F
F
fenixol2015-12-11 12:49:05
HTML
fenixol, 2015-12-11 12:49:05

How to connect Font-Awesome to Bitrix?

Good afternoon, dear forum users.
I need your help with Bitrix.
They asked mediasmart.pro to fix the side menu like a socket. Gave access to the test site electrolopata.ru. Yesterday morning I put the files from Font-Awesome into the template, did it as expected - I loaded the fonts into fonts and uploaded the font-awesome.css file into css with these fonts included. I included the font-awesome.css file in the header with the standard
<? $APPLICATION->SetAdditionalCSS(SITE_TEMPLATE_PATH . "/css/font-awesome.css"); ?>
and then it started. All site styles are gone. I turned off the combination of styles and js in the main module, turned off caching and still I can’t use the main.css style file in the template. Bitrix does not see all my changes. I can not understand. It seems that the bitrix main.css is cached somewhere ...
I don’t understand where to overwrite it .... If I turn on file merging again in the main module, then the site does not see the styles at all.
I would be very grateful if you could tell me where to look or what document to read.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
F
fenixol, 2015-12-11
@fenixol

This connection is in the header of all scripts.
<?
# If the user typed in a domain with www
if (preg_match( '|^www\..*|', $_SERVER [ 'HTTP_HOST' ]))
{ # redirect to a domain without a www
header ( 'HTTP/1.0 301 Moved Permanently' );
$url = trim($_SERVER[ 'REQUEST_URI' ], '/');
if(trim($_SERVER [ 'REQUEST_URI' ], '/') != '')
$url .= '/';
header('Location: electrolopata.ru '. $url);
die();
}
if(preg_match('#index\.php#siU',$_SERVER['REQUEST_URI'])){
$url = preg_replace('#index\.php#siU','',$_SERVER['REQUEST_URI'] ,one);
LocalRedirect($url);
}
if( $_SERVER['REQUEST_URI'] == '/index.html' ){
LocalRedirect('/');
}
if( $_SERVER['REQUEST_URI'] == '/index.php/' ){
LocalRedirect('/');
}
if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true)
die();
IncludeTemplateLangFile($_SERVER["DOCUMENT_ROOT"] . "/bitrix/templates/" . SITE_TEMPLATE_ID . "/header.php");
$wizTemplateId = COption::GetOptionString("main", "wizard_template_id", "eshop_adapt_horizontal", SITE_ID);
CUtil::InitJSCore();
CJSCore::Init(array("fx"));
$curPage = $APPLICATION->GetCurPage(true);
/*

*/
?>
< ? $APPLICATION->ShowHead(false);?>
<? $APPLICATION->SetAdditionalCSS(SITE_TEMPLATE_PATH . "/css/font-awesome.css"); ?>
<? $APPLICATION->SetAdditionalCSS(SITE_TEMPLATE_PATH . "/css/colors.css"); ?>
<? $APPLICATION->SetAdditionalCSS(SITE_TEMPLATE_PATH . "/css/reset.css"); ?>
<? $APPLICATION->SetAdditionalCSS(SITE_TEMPLATE_PATH . "/css/jquery.bxslider.css"); ?>
<? $APPLICATION->SetAdditionalCSS(SITE_TEMPLATE_PATH . "/css/modal.css"); ?>
<? $APPLICATION->SetAdditionalCSS(SITE_TEMPLATE_PATH . "/css/mistakes.css"); ?>
<?
if(strpos($curPage, '/cart/order/make/') === false)
$APPLICATION->SetAdditionalCSS(SITE_TEMPLATE_PATH . "/css/select.css");
else
$APPLICATION-> SetAdditionalCSS(SITE_TEMPLATE_PATH . "/jQueryFormStyler/jquery.formstyler.css");
?>
<? $APPLICATION->SetAdditionalCSS(SITE_TEMPLATE_PATH . "/css/checkbox.css"); ?>
<? $APPLICATION->SetAdditionalCSS(SITE_TEMPLATE_PATH . "/fancybox/jquery.fancybox.css?v=2.1.5"); ?>
<? $APPLICATION->SetAdditionalCSS(SITE_TEMPLATE_PATH . "/css/main.css"); ?>
<? $APPLICATION->SetAdditionalCSS(SITE_TEMPLATE_PATH . "/jquery.fancybox.css.css"); ?>
<? $APPLICATION->AddHeadScript(SITE_TEMPLATE_PATH . "/js/modernizr-2.6.2.min.js"); ?>
<? $APPLICATION->AddHeadScript(SITE_TEMPLATE_PATH . "/js/jquery-1.8.3.min.js"); ?>
<? $APPLICATION->AddHeadScript(SITE_TEMPLATE_PATH . "/js/jquery.bxslider.min.js");
?> <? $APPLICATION->AddHeadScript(SITE_TEMPLATE_PATH . "/js/rating_stars.js"); ?>
<? $APPLICATION->AddHeadScript(SITE_TEMPLATE_PATH . "/fancybox/jquery.fancybox.pack.js?v=2.1.5"); ?>
<? $APPLICATION->AddHeadScript(SITE_TEMPLATE_PATH . "/js/jquery.countdown.js"); ?>
<? $APPLICATION->AddHeadScript(SITE_TEMPLATE_PATH . "/js/jquery.slider.js"); ?>
<? $APPLICATION->AddHeadScript(SITE_TEMPLATE_PATH . "/js/mistakes.js"); ?>
<? $APPLICATION->AddHeadScript(SITE_TEMPLATE_PATH . "/js/jquery.maskedinput.min.js"); ?>
<? $APPLICATION->AddHeadScript(SITE_TEMPLATE_PATH . "/jquery.fancybox.js"); ?>
<? if(strpos($curPage, '/cart/order/make/'
) === false) {
$APPLICATION->AddHeadScript(SITE_TEMPLATE_PATH . "/js/jquery.select.js");
?>
<?
}
else
{
$APPLICATION->AddHeadScript(SITE_TEMPLATE_PATH . "/jQueryFormStyler/jquery.formstyler.min.js");
?>
<?}
?>
<? $APPLICATION->AddHeadScript(SITE_TEMPLATE_PATH . "/js/jquery.nice.radio.js"); ?>
<? $APPLICATION->AddHeadScript(SITE_TEMPLATE_PATH . "/js/jquery.checkbox.js"); ?>
<? $APPLICATION->AddHeadScript(SITE_TEMPLATE_PATH . "/js/jquery.main.js"); ?>
<? $APPLICATION->AddHeadScript(SITE_TEMPLATE_PATH . "/script.js"); ?>
<? $APPLICATION->ShowTitle() ?>
<?if( (strpos($_SERVER['REQUEST_URI'], '?') !== false) || ($_SERVER['REQUEST_URI'] == '/cart/') || ($_SERVER['REQUEST_URI '] == '/search/') ):?>
<?endif;?>
Already re-uploaded and when making a small change to the main.css file (commented out the line ) - Bitrix styles flew out.
.sub-menu div > a {
display: block;
padding: 8px 5px 9px 49px;
font-size: 11px;
line-height: 13px;
font-family: "dinpro-medium";
/* color: #fff;*/
text-transform: uppercase;
white-space: pre-line;
position: relative;
z-index: 2;
text-decoration: none;
}
After I removed the css file compression again, the site worked, but the main.css file does not show my changes. I cleared the cache from the admin panel more than once. Acceleration mode and composite site are disabled. The main.css file, when viewed through the firebug, looks like main.css?144983...
It is clear that it is cached somewhere... but where can I remove it? There is an assumption that on the host side it is cached and hangs ...

P
Pavel Tupikov, 2015-12-11
@2amedia

Publish the code for calling scripts in the section, you need to look and check the connection order.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question