Use style sheets in items
Overview
Style sheets can be used to format the look and feel of IWWCM pages in the same way as normal Web Pages.
Style sheet elements can only be stored in style sheet components.
To link a style sheet component to a specific authoring template, select a style sheet component as the default style sheet in an authoring template.
To link a style sheet component to a specific site, site area or content item, add a component reference element to a site, site area or content item and select a style sheet component.
Referencing a style sheet element in a presentation template
Style sheet elements are referenced in the "header" section of a presentation template using either a style element tag or component tag.
From a content item or presentation template, to use the style sheet specified in the authoring template <html> <head> <StyleElement source="template"/> </head> <body TEXT="Black" BGCOLOR="White" BACKGROUND="" LEFTMARGIN="10" RIGHTMARGIN="10" TOPMARGIN="0" BOTTOMMARGIN="0"> <Element context="current" type="content" key="Body"/> </body> </html>To use the style sheet selected in a component reference element stored in either the current site, site area or content item, use a <styleElement> tag.
<HTML> <head> <styleElement source="path" name="component_name"/> </head> <BODY></BODY> </HTML>To use a specific style sheet, use a <component> tag.
<HTML> <head> <component name="style_sheet_component_name"/> </head> <BODY></BODY> </HTML>When rendered in Web content, references to style sheet components are rendered as external style sheet links:
<HTML> <head> <link href="stylesheet" media="media-type" rel="styleheet-type" type="text"> </head> <BODY></BODY> </HTML>
Use styles in HTML tags
Styles are used in HTML stored in presentation templates and element designs in the same way as normal HTML. The style must exist in the style sheet that has been referenced in the presentation template used to render the HTML.
For example, to add a class called "wcm" to a heading tag:
<H1 class="wcm">Heading</H1>
Use styles in Web Content Management tags
Style sheets can be used to format the style of content retrieved using Web Content Management tags. The style must exist in the style sheet referenced in the presentation template used to render the Web Content Management tag.
For example, to format the links in a menu using a style sheet class called "wcm", the following placeholder tag would be used:
<a href="<placeholder tag="href" />" class="wcm"><placeholder tag="name" /></a>
Parent Topic
Style sheet element
Parent Topic
Display Web content