Note that text shown in this style documents a feature which isn't in the current release but will be in the next release and
text shown thus indicates a feature which is
being removed in the next release.
If you find anything in this documentation which is wrong or unclear then please use the link at the bottom on the page to comment and we will update the page to correct it or make it clearer.
These are the valid values of "name" in an <opustest> tag in an Opus template:
| name= | Usage |
|---|---|
| printable | You can produce a "printable" version of an article, typically
without the navigation, by clicking on a link. In the printable version
condition is set to "Y", otherwise it's set to "N". So if
part of the template is wrapped in:
it will only be displayed if the user is viewing the non-printable
version of the article.
|
| isprintable | If the article is printable (it's not always), then this is set to "Y", otherwise it's set to "N". |
| browser | This lets you specify bits of the template which are only
used with certain browsers, and only with certain releases of certain browsers.
The simplest case test for the browser, regardless of version. Possible values for the browser are:
So:
indicates that the bit of the template which follows should only be used if the browser is Internet Explorer. You can invert this condition by preceding it with a "!" hence:
indicates that the bit of the template which follows should only be used if the browser isn't Internet Explorer. If you need to go a stage further and specify the release of the browser you can specify a release number and one of "gt", "ge" , "eq", "le", or "lt" for greater than, greater than or equal to, equal to, less than or equal to, or less than, and use the "!" prefix to invert the condition. Hence:
indicates that the bit of the template which follows should only be used if the browser isn't Internet Explorer of release 6 or higher. Note that this is not the same as:
which indicates that the bit of the template which follows should only be used if the browser is Internet Explorer but of release 5 or lower. You can even go down to the decimal part of the release number, in which
case the comparison becomes release specific (ie |
| articlecode sectioncode papercode typecode datacard |
This lets you specify bits of the template which are only used
for certain articles or sections by testing the articlecode, sectioncode or papercode, typecode or datacard name if it's a datacard (so typecode of "xdb") of the article. For example:
indicates that the template from here on should only be shown for articles in section 5. As with browser releases "gt", "ge", "eq", "le", or "lt" for greater than, greater than or equal to, equal to, less than or equal to, or less than,, and use the "!" prefix to invert the condition are allowed. An additional test "in" lets you test for a range of values, separated by "|". So for example:
indicates that the template from here on should only be shown for articles in section 5, 8 or 999999. The ability to test on sectioncode is particularly useful as it means one template can be used for several sections while being rendered slightly differently each time. |