Share » Forums » General » Delete information collection

Delete information collection

Delete information collection

Saturday 05 April 2008 3:46:53 am - 1 reply

Author Message

Xavier Gouley

Saturday 05 April 2008 10:58:40 am

Hi,

You have to follow this template, in the admin interface: design/admin/templates/infocollector/view.tpl

This one does what you want, in the admin interface :
see the form tag, and input tags :

<form name="objects" method="post" action={concat( '/infocollector/collectionlist/', $collection.contentobject_id )|ezurl}>
<input class="button" type="submit" name="RemoveCollectionsButton" value="{'Remove'|i18n( 'design/admin/infocollector/view' )}" title="{'Remove collection.'|i18n( 'design/admin/infocollector/view' )}" />
<input type="hidden" name="CollectionIDArray[]" value="{$collection.id}" />

You just have to paste them in your template, and I think, add in appropriate roles (for users that can remove info collection in the front office), the infocollector module.

When you click to this button, the next page that will be automatically loaded is the design/admin/templates/infocollector/confirmremoval.tpl : just look in this admin template, as for the first step, to retrieve form and input tags. This template shows a "confirm form". Copy this template in your front office design folder (to the same destination folder, and same name), and adapt it graphically (adapt HTML code, but not form and input tags).
When you confirm in this second page, the collection is removed, but you will be redirected to: design/admin/templates/infocollector/collectionlist/{$objectID} page automatically, which generally does not exist in a front office. This page use the infocollector/collectionlist.tpl, so you can copy it (like previously), and make a redirection in this page, where you want, for example.

I think this should work. If not, use the kernel/infocollector/collectionlist.php as a good model to make yourself a new module in an extension.

Gook luck !

Xavier Gouley
http://www.gxapplications.com/eng_blog/GX-Admin-s-Blog/

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu