Alternatives to the tag_edit and tag_delete Web App tags

Learn an alternative way to include web app <em>edit</em> and <em>delete</em> tags that will allow you to change the link text and have better overall control of the HTML

Thursday, July 12, 2012 - Posted by Carol Lemke to Technical How-tos

Business Catalyst provides tags that allow visitors logged into a secure zone to edit or delete a web app item. Depending on how the web app is set up, users can edit all web app items or just be allowed to edit their own submissions. Users are only allowed to delete their own submissions. If users try to delete an entry that was created by someone else, they will get re-directed to an error screen that says, "ERROR: You cannot edit an item that was not submitted by you in the first place."

The tag you would insert to edit is {tag_edit} and this will output an <a> link that surrounds the text, "Edit".

The tag you would insert to delete is {tag_delete} and this will output an <a> link that surrounds text, "Delete".

Alternative output for Edit

This allows you to edit the HTML of the tag or change the link text from "Edit" to something else.

Alternative output for Delete

This allows you to edit the HTML of the tag or change the link text from "Delete" to something else.

Add Alert to Delete

As I said before, users are only allowed to delete their own submissions. However, the user may not be aware of such an issue so it may be nice to include an "onclick" event on the delete link as a way to alert the user of this issue before they get automatically re-directed to the error page.

comments powered by Disqus