Kentico CMS 7.0 Context Help

Output filter

Output filter

Previous topic Next topic Mail us feedback on this topic!  

Output filter

Previous topic Next topic JavaScript is required for the print function Mail us feedback on this topic!  

The settings in this category allow you to adjust the Output filter, which performs additional changes to the final output code of pages before it is sent to the browser for rendering.

 

You can use the Excluded URLs settings to disable various types of output filtering for specific sections of the website (e.g. due to performance reasons). To exclude all pages that start with a certain URL path, enter this path into the corresponding field (without the ~ character and extension). Multiple URL paths may be added, separated by semicolons (;).

 

Please note that this only excludes specific URLs, not entire documents. For instance, if you exclude the /Home URL path, but then access the Home page through a different URL or alias (such as the website root configured to display the Home page), output filtering will still be enabled.

 

Examples:

 

/ - disables the filter for the entire website.

/Products - disables filtering for the Products page under the website root and all other pages whose URL path starts with /Products (e.g. child documents).

/Services;/News - excludes all pages whose URL path starts with /Services or /News.

/Company. - by adding the period character (".") after the URL path, you can exclude only one specific page, but not its child documents (this will not work with extensionless URLs).

 

General

Excluded output form filter URLs

May be used to disable the Form output filter for specific URL paths, which fixes issue with non‑working postbacks on pages that use URL rewriting. It ensures that forms, dialogs and buttons will work correctly on pages managed by Kentico CMS.

Excluded resolve filter URLs

Allows you to disable the URL resolving output filter, which adjusts relative URLs so that they reflect the root URL of the website.

 

For example, ~/mypage1/mypage2.aspx would be changed to /mypage1/mypage2.aspx (if the application is running in the root) or /VirtualDirectory/mypage1/mypage2.aspx (when using a virtual directory).

 

Only URLs inside src and href attributes are changed.

XHTML filter

Excluded XHTML filter URLs

May be used to specify the URL paths of the pages that should be excluded from all functionality provided by the XHTML output filter.

Excluded XHTML attributes filter URLs

Specifies the URL paths of thepages that should be excluded from the Tag attribute XHTML filter, which ensures that all attributes of HTML tags are generated in valid XHTML format.

Excluded XHTML JavaScript filter URLs

Specifies the URL paths of the pages that should be excluded from the JavaScript tag XHTML filter, which ensures that the type and language attributes are included in all <script> tags.

Excluded XHTML lower case filter URLs

Specifies the URL paths of the pages that should be excluded from the Lower case XHTML filter, which ensures that all HTML tags and attributes are generated in lower case.

Excluded XHTML self close filter URLs

Specifies the URL paths of the pages that should be excluded from the Self closing tag XHTML filter, which ensures that all HTML elements without closing tags are properly closed, e.g. <br> will be replaced by <br />.

Excluded XHTML tags filter URLs

Specifies the URL paths of the pages that should be excluded from the Invalid tag XHTML filter, which ensures that XHTML-invalid tags are replaced by appropriate equivalents (<strong> instead of <b>, <em> instead of <i>).

Excluded HTML 5 filter URLs

Specifies the URL paths of the pages that should be excluded from the HTML5 output filter.

 

This filter replaces tag attributes that are obsolete in HTML5. Such attributes are removed and the system instead assigns CSS classes named in format <attribute name>_<attribute value>. These classes need to be defined in the CSS stylesheet used by the website's pages.

 

The affected attributes are: cellpadding, cellspacing, width, height, border, align, valign

 

For example:

 

<table cellpadding="2" cellspacing="4">

 

would be replaced by:

 

<table class="cellpadding_2 cellspacing_4">

Indent output HTML

Indicates if the HTML output of pages should be processed into a properly indented, easier to read format. This setting is applied to all pages on which the XHTML output filter is enabled.

Convert TABLE tags to DIV tags

Determines which <table> elements (and their child <tr> and <td> tags) should be converted to <div> elements by the output filter. The system automatically assigns CSS classes to the replacement Div tags according to the name of the original tag. The classes need to be defined in the CSS stylesheet used by the website's pages.

 

This behavior can either be disabled completely, enabled for all tables except for those marked by the _nodivs CSS class, or only enabled for the tables designated through the _divs class.

 

Enabling output filters for specific web part instances

 

You can enable the output filters separately for the code generated by Web parts. This allows you to filter the output of specific instances of web parts, even if their parent page is excluded from the output filter via the website settings. Output filtering is always used for web parts on pages that are not excluded.

 

To access these settings, configure (Configure) the given web part on the Design tab of CMS Desk and adjust its Output filter properties. This section of properties is available for all web parts.

 

Additional resource:

 

Developer's Guide -> Development -> Page processing and URLs -> Output filters