B
B
BarneyGumble2020-08-15 15:57:45
1C-Bitrix
BarneyGumble, 2020-08-15 15:57:45

How to connect styles in Bitrix via API with additional attributes?

I know that the construction of the form

<link rel="stylesheet" href="<?=SITE_TEMPLATE_PATH;?>/css/styles.css" />

connect to Bitrix correctly using the API, like this:
$APPLICATION->SetAdditionalCSS(SITE_TEMPLATE_PATH."/js/fancybox/styles.css");

But how to include styles through the API if additional attributes are used, such as media?
<link rel="stylesheet" media="all and (max-width: 1280px)" href="<?=SITE_TEMPLATE_PATH;?>/css/resize1280.css" />

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Edward, 2020-08-15
@Drayde

Use $APPLICATION-> AddHeadString()

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question