Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

The css_xhtml theme is the default theme in WebWork. It provides all the basics that the simple theme provides , plus these additional features:and adds several features.

Wrapping the Simple Theme

...

The css_ xhtml theme uses the "wrapping" technique mentioned in described by Extending Themes, also done by the xhtml theme. As such, it is important to understand . Let's look at how the HTML tags are wrapped by a standard header and footer. For example, take a look at in the textfield template, text.ftl:

...

text.ftl

...

As you can see, the controlheader.ftl and controlfooter.ftl templates are wrapped around the simple template.

CSS XHTML Theme Header

Now let's look at the controlheader.ftl:

...

CSS XHTML theme header

The header used by the HTML tags in the css_xhtml theme is somewhat complexcomplicated. Unlike the xhtml theme, this the CSS theme does not support the use a labelposition attribute. Instead, your CSS rules can define how the layout is done.the label position is defined by CSS rules.

...

Note Also note that the fieldErrors, usually caused by Validation, are displayed in a div block before the element is displayed.

CSS XHTML

...

theme footer

And the controlfooter.ftl contents:

...

Special

...

Interest

Two css_xhtml templates of special interest are head and form.

Head template

The css_xhtml head template is similar to the xhtml head template. The difference is that CSS is used to provide the layout.

...

The head includes a style sheet.

...

Form template

The css_xhtml form template is almost exactly like the xhtml form template, including support for Pure JavaScript Client Side Validation. The difference is that instead of printing out an opening and closing <table> element, there are no elements. Instead, the CSS rules for the individual HTML tags are assumed to handle all display logic. However, as noted, client-side validation is still supported.

While most of the templates in this theme are self explanatory, there are some templates that should be called out and explained in detail:

...