Commit ec9df256 authored by merlinofchaos's avatar merlinofchaos
Browse files

Allow CSS file to be specified by ini file

parent 91d2264f
......@@ -530,6 +530,10 @@ function advanced_help_view_topic($module, $topic, $popup = FALSE) {
}
}
if (!empty($info['css'])) {
drupal_add_css($info['path'] . '/' . $info['css']);
}
return '<div class="advanced-help-topic">' . $output . '</div>';
}
}
......@@ -586,7 +590,8 @@ function advanced_help_get_topics() {
'file' => $file . '.html', // require extension
'path' => $path, // not in .ini file
'line break' => isset($topic['line break']) ? $topic['line break'] : (isset($settings['line break']) ? $settings['line break'] : FALSE),
'navigation' => isset($topic['line break']) ? $topic['line break'] : (isset($settings['line break']) ? $settings['line break'] : TRUE),
'navigation' => isset($topic['navigation']) ? $topic['navigation'] : (isset($settings['navigation']) ? $settings['navigation'] : TRUE),
'css' => isset($topic['css']) ? $topic['css'] : (isset($settings['css']) ? $settings['css'] : NULL),
);
}
}
......
......@@ -9,6 +9,8 @@ Global settings may be put into a section named <strong>[advanced help settings]
<dd>If set to any value, the line break filter will be applied to all help files defined by this module, unless that help file specifically is set otherwise. By default, the line break filter is not applied; however, help files can be much easier to write with the line break filter on.</dd>
<dt><strong>navigation</strong></dt>
<dd>If set to true, the navigation will be displayed at the end of the help topic: previous topic, next topic, and child topics.</dd>
<dt><strong>css</strong></dt>
<dd>Specify a css file that will be used for all help files (unless overridden), including the .css extension. This .css file must reside in the help directory along with the .html files, and will not be affected by translation.</dd>
</dl>
Each section after that will correspond to a single help file, and each one may have the following settings:
......@@ -23,6 +25,8 @@ Each section after that will correspond to a single help file, and each one may
<dd>The topic ID to use in a hierarchy; children will be listed beneath parents in the topic list, and will have the parent in their breadcrumb trail. You may parent this topic to another module's topic by using module%topic as the identifier. For example, 'views%display' will make this a child of the 'display' topic in the 'views' module.</dd>
<dt><strong>line break</strong</dt>
<dd>If set to true, linebreaks will be converted into br and p tags automatically. If unspecified, will default to off. Set to 0 to disable the filter if this has been turned on in the global settings.</dd>
<dt><strong>css</strong></dt>
<dd>Specify a css file that will be used for this file. This .css file must reside in the help directory along with the .html files. This will override any .css file added by the global system.</dd>
</dl>
For example, here is a version of the <strong>advanced_help.help.ini</strong> file:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment