Например, сейчас я добавляю так
<?php
drupal_add_css('../styles/slidedeck.css');
?>
А надо вот так:
<?php
$style = "#slidedeck_frame { width: 94%; height: 450px; }";
// И вот тут надо что-то вместо drupal_add_css
?>
Например, сейчас я добавляю так
<?php
drupal_add_css('../styles/slidedeck.css');
?>
А надо вот так:
<?php
$style = "#slidedeck_frame { width: 94%; height: 450px; }";
// И вот тут надо что-то вместо drupal_add_css
?>
Комментарии
Читайте внимательнее список параметров этой функции на api.drupal.ru
Ну вот давайте посмотрим (может я чего-то не понимаю):
<?php
drupal_add_css($path = NULL, $type = 'module', $media = 'all', $preprocess = TRUE)
?>
$path(optional) The path to the CSS file relative to the base_path(), e.g., /modules/devel/devel.css.
$type(optional) The type of stylesheet that is being added. Types are: module or theme.
$media(optional) The media type for the stylesheet, e.g., all, print, screen.
$preprocess(optional) Should this CSS file be aggregated and compressed if this feature has been turned on under the performance section?
И как тут мне вставить свою переменную? Тут же только путь можно указывать.
drupal_add_css('#slidedeck_frame { width: 94%; height: 450px;', array('type' => 'inline'));
'inline': A string of CSS that should be placed in the given scope. Note that it is better practice to use 'file' stylesheets, rather than 'inline', as the CSS would then be aggregated and cached.