Image | <lcui:img/> or <xsl:call-template name="lcui:img"/> Creates an image tag that includes a dynamic URL to the image source, including a skin parameter, if it has been passed to the HTML template. Produces an <img/> tag. |
file or key -- One of these parameters determines which image file gets loaded. If file is provided, then it is the name of the image file to load (checkmark.gif). If key is provided, then it is a key into the language resources, and the value stored in that key is an image name (a key button.cancel might resolve to cancel_button_en-us.gif, but may resolve different based on the selected language). Key allows for the support of localized images. You can only provide one of these two parameters. If both are provided, key will override file.
switchkey or switchfile -- In some cases within the UI, you want an image to switch from one image (on) to another (off). This may be caused by a user clicking the image or by some other UI process. To do this, you can provide a switchkey or switchfile attribute to this tag or named template. At runtime, if you employ the CVPortal.switchImg function, the image switches to the second image easily without additional coding. Switchkey and switchfile function exactly as key and file, but are only exposed when the image is switched. Using the switchImg function, you can switch back to the original as well. You can only provide one of these two parameters. If both are provided, switchkey overrides switchfile.
class -- CSS class to assign to this image (for example, myClass), which is inserted into the @class attribute.
style -- CSS style to use for this image (border:1pt solid black) which is inserted into the @style attribute
alt -- Alternate text or title to use for the image (for example, "Content Delivery") which is inserted into both the @alt and @title attributes
onClick -- JavaScript function to call if the image is clicked on (for example, CVPortal.help.showHelp())
|
HTML Link | <lcui:link/> or <xsl:call-template name="lcui:link"/> Creates an HTML link (an <a> tag). The text of the tag will be a localized string, and the URL of the tag is formed dynamically by the parameters passed in to the tag. |
value -- Key into the language resources, which is used as the text of the link.
url -- URL to invoke when the link is clicked, (for example, session.xql)
params -- URL parameters to include with the link (for example, ?action=logout)
class -- CSS class to apply to the link object
style -- CSS style to place inline on the link object
|
Form Input | <lcui:input/> or <xsl:call-template name="lcui:input"/> Creates a form element on the page, which can be of different types (a text input field, a hidden form field, a checkbox, a submit button). Creates an <input/> element. |
type -- One of the following: text, hidden, checkbox, or submit.
class -- CSS class to assign to this form field (for example, myClass), which is inserted into the @class attribute
style -- Image-specific style to use for this form field (for example, border:1pt solid black) which is inserted into the @style attribute
value -- Sets the value of the input (@value). The value is always interpreted as a key to a localized string (through lcui:string).
onClick -- JavaScript action to execute if the element is clicked. Most often used when @type="button".
disabled -- Set to true or disabled to disable this form input
id -- @id attribute for this form input
|
Dynamic Attributes | <lcui:attr/> The <lcui:attr/> tag allows you to insert an attribute with a dynamic value into an HTML element in your template. For example, you could insert a localized value into an attribute on an HTML element. The content of the <lcui:attr/> element is evaluated and inserted as the value of the named attribute. For example, you could use this tag to insert the value of an <lcui:var/> into an attribute:
<img>
<lcui:attr name="src">
<lcui:var key="image_src"/>
</lcui:attr>
</img> The HTML output of this call would vary based on the value of the img_src variable, for example: <img src="my_variable.jpg"/> There is no named template (<xsl:call-template/>) equivalent of this tag, as XSL handles this using the <xsl:attribute/> element. |
- name - The name of the attribute to create
|