diff --git a/etemplate/doc/reference.html b/etemplate/doc/reference.html index 7622e86b27..18f73ea97f 100644 --- a/etemplate/doc/reference.html +++ b/etemplate/doc/reference.html @@ -390,7 +390,7 @@ implement only a subset of XUL. Here are the main differences:
3. if set URLs in the content get activatedlink-list
link-string
- link-to
- Widget to make a links to other entries of link-aware apps and to attach files.
+ These widgets are the UI-part of the link-class ({bo|so}link) in the API.
+ eGroupWare has a linking system that lets you link two records from different apps together.
+ For example, you can link the addressbook entry of the person you're meeting with to the meeting on your calendar, + or an infolog entry for the phone call you made to postpone the meeting.
+ To display links in your own application, you should use the LinkList group of widgets.
link-list
Widget to shows the links to an entry and a Unlink Button for each link.
+ It needs an array with two entries. If you name the LinkList widget 'links', you need:
++$data['links']['to_app'] = 'myapp'; +$data['links']['to_id'] = $record_id; ++
This will display links where the $record_id record of myapp is one side of the link. + Make sure that both variables are properly defined before the form template gets executed. +
link-to
+ Widget to make a links to other entries of link-aware apps and to attach files.
Note: Both Widgets can be used on the same template with the same name. They share - the content of that variable, which contains just the id of the entry in the current app.
+ the content of the variable with that name, which contains just the id of the entry in the current app.
link-string
Comma-separated list of link-titles with a link to its view-method, value is like the return
- of bolink::get_links().
+ of bolink::get_links().
+
+ In your setup.inc.php, you need to point $setup_info['myapp']['hooks']['search_link'] to a function that will return an array:
+
return array( +'query' => 'myapp.bo_myapp.link_query', + // A function that takes a search string + // and returns a list of matching records +'title' => 'myapp.bo_myapp.link_title', + // A function that takes an id from one side + // of a link and returns a string for that entry +'view' => array('menuaction'=>'myapp.ui_myapp.link_view'), + // Function to view a link, may be an existing view function +'view_id' => 'link_id', + // name of the id variable provided to the view function above +'add' => array('menuaction' => 'myapp.ui_myapp.new_entry'), + // Function to add a new entry +); ++
Also, make sure that the declared methods are implemented and methods from the UI class are listed in its $public_methods attribute: +
+class ui_myapp { + var $public_methods = array( + 'view' => true, + 'add' => true + ); +... +} +
* $content[$name] = array(
@@ -43,7 +46,7 @@
* );
*
*
- * This widget is independent of the UI as it only uses etemplate-widgets and has therefor no render-function.
+ * This widget is independent of the UI as it only uses etemplate-widgets and has therefore no render-function.
*
* @package etemplate
* @subpackage extensions