<xmod:deletebutton>

Related Topics

 

New to version 4.0

Upgrade Note:
When upgrading from version 3.x you should replace any <xmod:deletelink> tags in your templates with <xmod:deletebutton>

 

TEMPLATE CONTROL: This tag is only valid in a list view template.

 

DESCRIPTION:

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.

 

 

ATTRIBUTES:

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:

  • button - an HTML-style button will be displayed

  • imagebutton - a click-able image will be displayed. Be sure to set the imageurl attribute.

  • linkbutton - the button will be displayed as a hyperlink. This is the default value.

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.

confirmmessage

Allows you to specify the text the user is prompted with prior to deleting the record. If the user clicks the "Yes" button, the record will be deleted. If the user clicks "No" the action is canceled.

 

 

EXAMPLE

Display the link as "Delete Album Entry" with the NormalBold CSS class applied and decorated with a 1 pixel red border surrounding it.
 

<xmod:deletebutton text="Delete 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:deletebutton text="Delete 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:deletebutton display="imagebutton" imageurl="~/images/copy.gif" text="Delete Album Entry"/>

 

Here's an example that results in a standard HTML button being displayed and assigned the CSS class name of "CommandButton":

 

<xmod:deletebutton display="button" text="Delete Album Entry" class="CommandButton" />