New to version 4.0
Upgrade Note:
When upgrading from version 3.x you should replace any <xmod:copylink> tags in your templates with <xmod:copybutton>
TEMPLATE CONTROL: This tag is only valid in a list view template.
Allows you to present your users with a hyperlink, HTML button, or image button that, when clicked will enable them to create a duplicate of the current record and edit that record. This button will only be visible to users who have permission to copy records.
|
text |
Text to be displayed in the link or button. If display is "imagebutton" then this value will be the image's alternate text. [String value] |
|
class |
Name of the CSS Class used to style this item. [String value] |
|
style |
Same as the HTML style attribute. It allows you to apply CSS styling to the element. (Optional). [String value] |
|
display |
Determines how the button will be rendered at runtime. Valid values are:
|
|
imageurl |
When display is set to "imagebutton" the value of this attribute will be used to find the image to display. Any valid URL pointing to a valid image file can be used. |
|
height |
Determines the height of the control at run-time using a measurement unit. |
|
width |
Determines the width of the control at run-time using a measurement unit. |
|
onclick |
Allows you to assign a client-side Javascript function to the button's OnClick event. If the result of the Javascript is true then the button will perform its normal functions. If the result is false the button will cancel its normal functions (i.e. copying a record for <xmod:copybutton> tags, editing a record for <xmod:editbutton> tags, etc.) |
Display the link as "Copy Album Entry" with the NormalBold CSS class applied and decorated with a 1 pixel red border surrounding it.
<xmod:copybutton text="Copy Album Entry" class="NormalBold" style="border: 1px solid red;" display="linkbutton" />
Here's the same example, but used in a Grid view. For this example we're not using the display attribute. It's not necessary since the default value for display is "linkbutton":
<xmod:grid>
<columns>
<column header="Artist">
<xmod:field name="ArtistName"/>
</column>
<column header="Admin">
<xmod:copybutton text="Copy Album Entry" class="NormalBold" style="border: 1px solid red;" />
</column>
</columns>
</xmod:grid>
The following is an example of an image button. NOTE the "~" in the imageurl. This is a shortcut that resolves at run-time to the website's root directory. For most sites this isn't necessary, you could replace "~/images/myimage.gif" with "/images/myimage.gif" and the result would be the same.
<xmod:copybutton display="imagebutton" imageurl="~/images/copy.gif" text="Copy Album Entry"/>
Here's an example that results in a standard HTML button being displayed and assigned the CSS class name of "CommandButton":
<xmod:copybutton display="button" text="Copy Album Entry" class="CommandButton" />