fn: cssinclude
[contents]

Contents

Syntax

The syntax for cssinclude calls is:

f++:  
cssinclude{options}(abolute-path)

n++:  
@cssinclude{options}(absolute-path)

Description

The cssinclude function takes a single absolute path as input and returns the following code to insert the path as a stylesheet in html using the relative path:

<link rel="stylesheet" type="text/css" href="relative-path" options>

The cssinclude function also throws a warning if the image file does not exist.

Note: Another good way to include a css file, where an error is thrown if the file does not exist, is:

<link rel="stylesheet" 
      type="text/css" 
      href="@pathtofile(absolute-path)">

Options

Anything added as an option to a cssinclude call will be added to the code to insert the path as a stylesheet as outlined in the Description section.

f++ example

Example of cssinclude being used with f++:

cssinclude("site/assets/css/main.css")

n++ example

Example of cssinclude being used with n++:

@cssinclude("site/assets/css/main.css")