Customize view/edit links in CRUD pages

Generated CRUD pages have default links for exit, view, save, from version 3.2.2 (Released on Mercurial November 27) you can override this link like:

Method 1, on VIEW class

Class: VIEW

Method: set_controlls

1 $strategy->setlink('exit', 'http://tequilaphp.com');

The links available are:

For view mode:

    • delete

    • exit

    • edit

    • viewcomplete

For Edit mode:

    • saveajax

    • exit

    • submit

Exit mode in some cases can be problematic, you can determine the strategy type before setting the exit link like:

1 if (get_class($strategy) == 'view_object')2 {3 $strategy->setlink('exit', 'http://tequilaphp.com');4 }

Method 2

You can replace straight in the template file

Method 3

You can replace the placeholder name in the template and assign in the view the new link