I have a html table inside the index view, a column called “Actions” where edit link is provided, example:
<code><tr>
<td><?php echo $row->title; ?></td>
<td><a href="<?php echo $data['controller']->get_edit_url($row->ID); ?>">Edit</a></td>
</tr>
</code>
<code><tr>
<td><?php echo $row->title; ?></td>
<td><a href="<?php echo $data['controller']->get_edit_url($row->ID); ?>">Edit</a></td>
</tr>
</code>
<tr>
<td><?php echo $row->title; ?></td>
<td><a href="<?php echo $data['controller']->get_edit_url($row->ID); ?>">Edit</a></td>
</tr>
I am building edit url from controller: $data['controller']->get_edit_url($row->ID)
Some people saying view can access the controller and some people say you can’t.