AnsweredAssumed Answered

Use default action buttons in custom view

Question asked by benvercammen on Aug 20, 2008
Latest reply on Aug 21, 2008 by benvercammen
I'm pretty new to Alfresco and am currently working on a custom view (in community 2.1.0 edition). My goal is to list the properties of my custom content and add some links to actions to them. However, I would also like to make use of the "default" edit, delete, view details, … buttons in order to not force the users who want to edit the content from the list to scroll all the way down to the "Content Items" section.

Here's what I've come up with in the FTL by copy-pasting from the HTML code of the Web Client:

Edit button:

<a href="#" onclick="document.forms['browse']['browse:act'].value='browse:edit_doc_http_id_367';document.forms['browse']['id'].value='${document.id}';document.forms['browse'].submit();return false;" id="edit_doc_http_id_367"><img src="…"></a>
The same goes for Delete and View Details, with the exception that they have the "browse value" of "details_doc_id_381" and "delete_doc_id_385" (instead of "edit_doc_http_id_367"). So now I'm wondering how I could get the correct "details_doc_id_" or "delete_doc_id_" values for each document… I do have the feeling that this should be documented somewhere, but I just can't seem to find it.

So can someone please tell me more about how this works, provide a tutorial that covers this or at least point me in the right direction to continue my search? (I have been looking for a few hours already, but to no avail…)

Thanks in advance!

Outcomes