且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

十月CMS |在控制器中,在preview.htm上创建编辑按钮,然后链接到具有相同ID的update.htm

更新时间:2022-04-21 21:56:07

您可以使用$formModel,因为Form Behavior会将其注入以便查看.

You can use $formModel as Form Behavior will inject it to view.

<a
    href="<?= Backend::url('author/plugin/your_controller/update/'.$formModel->id) ?>"
    class="btn btn-primary oc-icon-pencil">
    Edit
</a>

您可以在工具栏中添加此标记,以将用户重定向到编辑模式.

You can add this markup in your toolbar to redirect user to edit mode.

如有疑问,请发表评论.

if any doubt please comment.