tbl_link(), tbl_link_add(), tbl_link_edit(), tbl_link_delete(), tbl_link_clone(), tbl_link_view(), tbl_link_active() form()
Small row-action links for item templates (category or menu editors): add, edit, delete, clone, view, active.
form()->tbl_link($name, $link, $extra = [], $replace = [])
form()->tbl_link_add($name = '', $link = '', $extra = [], $replace = [])
form()->tbl_link_edit($name = '', $link = '', $extra = [], $replace = [])
form()->tbl_link_delete($name = '', $link = '', $extra = [], $replace = [])
form()->tbl_link_clone($name = '', $link = '', $extra = [], $replace = [])
form()->tbl_link_view($name = '', $link = '', $extra = [], $replace = [])
form()->tbl_link_active($name = '', $link = '', $extra = [], $replace = [])Options
| Option | Meaning |
|---|---|
$link | URL, or a $replace key; the tbl_link_* variants look for add_link / add_url, edit_link / edit_url... in $replace. |
icon, class, class_add, hide_text, rewrite, target, title | Look of the link; default CLASS_BTN_MINI and the table2 icons. |
Example
Code
$item = ['edit_link' => '#edit-7', 'delete_link' => '#delete-7', 'clone_link' => '#clone-7', 'view_link' => '#view-7', 'active_link' => '#active-7', 'add_link' => '#add'];
return form($item, ['no_form' => 1])
->tbl_link('History', '#history-7', ['icon' => 'fa fa-history'])
->tbl_link_add()
->tbl_link_edit()
->tbl_link_delete()
->tbl_link_clone()
->tbl_link_view()
->tbl_link_active();Notes
- In templates:
{form_row('tbl_link_edit')}with the item as$replace(the drag tree of the category editor). - In the admin a link the admin group may not open is not printed.
See also: table/btn_edit, html/tree