G
G
Good Samaritan2017-10-24 13:27:58
1C-Bitrix
Good Samaritan, 2017-10-24 13:27:58

How to connect cdn resources with Asset::getInstance()->addJs?

I know how to include a local file, for example

Asset::getInstance()->addCss(SITE_TEMPLATE_PATH."/style/main.css");

And how to connect via Asset, for example, this:
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Emelyanov, 2017-10-24
@babarun

Asset::getInstance()->addString('<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">');

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question