Views: 4792
Last Modified: 10.10.2012
CSS tables should be linked within the <head> tag of a header (header.php
) in the following way
<?
$APPLICATION->ShowCSS();
?>
All the required HTML code will be inserted by the API function specified above.
This function includes a CSS file from the current template. Also it includes all additional styles defined for the page by calling the function SetAdditionalCSS()
internally.
<?
$APPLICATION->SetAdditionalCSS("/bitrix/templates/demo/additional.css");
?>
If called without arguments, the ShowCSS()
method includes styles by adding the following code:
<LINK href="/bitrix/templates/demo/styles.css" type="text/css" rel="STYLESHEET">
All styles added by calling SetAdditionalCSS()
will be included in the page code as follows: require(…)
.
If called with the false argument,
<?
$APPLICATION->ShowCSS(false);
?>
then the CSS file of the current template is also included by calling require()
.