17.3 ADD_FILE Procedure
This procedure adds the link tag to load a CSS library. If a library has already been added, it will not be added a second time.
Syntax
APEX_CSS.ADD_FILE (
p_name IN VARCHAR2,
p_directory IN VARCHAR2 DEFAULT apex_application.g_image_prefix||'css/',
p_version IN VARCHAR2 DEFAULT NULL,
p_skip_extension IN BOOLEAN DEFAULT FALSE,
p_media_query IN VARCHAR2 DEFAULT NULL,
-- p_ie_condition is desupported and has no effect
p_ie_condition IN VARCHAR2 DEFAULT NULL,
p_attributes IN VARCHAR2 DEFAULT NULL );
Parameters
Parameter | Description |
---|---|
p_name
|
Name of the CSS file. |
p_directory
|
Begin of the URL where the CSS file should be read from. If you use this function for a plug-in, set this parameter to p_plugin.file_prefix |
p_version
|
Identifier of the version of the CSS file. The version will be added to the CSS filename. In most cases you should use the default of NULL as the value.
|
p_skip_extension
|
The function automatically adds .css to the CSS filename. If set to TRUE , the function ignores this addition.
|
p_media_query |
Value set as media query. |
p_ie_condition |
(Desupported) Condition used as Internet Explorer condition. |
p_attributes |
Extra attributes to add to the link tag. Note: Callers are responsible for escaping this parameter. |
Example
Adds the CSS filejquery.autocomplete.css
in the directory specified
by p_plugin.file_prefix
to the HTML output of the page and makes
sure that it will only be included once if apex_css.add_file
is
called multiple times with that name.
apex_css.add_file (
p_name => 'jquery.autocomplete',
p_directory => p_plugin.file_prefix );
Parent topic: APEX_CSS