11.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.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   IN    VARCHAR2 DEFAULT NULL);

Parameters

Table 11-3 ADD_FILE 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 you should 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 this parameter is set to TRUE this will not be done.

p_media_query

Value set as media query.

p_ie_condition

Condition used as Internet Explorer condition.

Example

Adds the CSS filejquery.autocomplete.css in the directory specified by p_plugin.image_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 );