xowiki::Package instproc make_link (public)

 <instance of xowiki::Package[i]> make_link \
    [ -with_entities with_entities ] [ -privilege privilege ] \
    [ -link link ] object [ method ] args [ args... ]

Defined in packages/xowiki/tcl/package-procs.tcl

Creates conditionally a link for use in xowiki. When the generated link will be activated, the specified method of the object will be invoked. make_link checks in advance, whether the actual user has enough rights to invoke the method. If not, this method returns empty.

Switches:
-with_entities
(defaults to "0") (optional)
-privilege
(optional)
When provided, the privilege can be "public" (do not check rights) or a privilege to be checked on the package_id and the current user. When this parameter is not specified, the policy is used to determine the rights to be checked.
-link
(optional)
When this parameter is specified, is used used as base link for export_vars when applied on pages (or for packages as next segment under the package url). When not specified, the base url for pages is the current url, and for packages it is the package url.
Parameters:
object - The object to which the link refers to. If it is a package_id it will base to the root_url of the package_id. If it is a page, it will base to the page_url
method (optional) - Which method to use. This will be appended as "m=method" to the url. Examples for methods:
  • view: To view and existing page
  • edit: To edit an existing page
  • revisions: To view the revisions of an existing page

args - List of attributes to be append to the link. Every element can be an attribute name, or a "name value" pair. Behaves like export_vars.
Returns:
The link or empty
See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 test_xowiki_test_cases xowiki_test_cases (test xowiki) xowiki::Package instproc make_link xowiki::Package instproc make_link test_xowiki_test_cases->xowiki::Package instproc make_link ad_try ad_try (public) xowiki::Package instproc make_link->ad_try

Testcases:
xowiki_test_cases
[ show source ]
Show another procedure: