开发者

Delete button in Joomla item view in back-end

开发者 https://www.devze.com 2023-03-25 03:17 出处:网络
I would like to place the delete button from Joomla category vi开发者_运维问答ew in the item view, so that when a user navigates in backend to that item he would be able to delete it.

I would like to place the delete button from Joomla category vi开发者_运维问答ew in the item view, so that when a user navigates in backend to that item he would be able to delete it.

I tried to move the function of the delete button from category view to the item view but it doesn't work since that function requires a item to be selected. In item view that particular item should already be selected.


You probably want to use something like this:

if ($this->state->get('filter.published') == -2 && $canDo->get('core.delete')) {
            JToolBarHelper::deleteList('', 'articles.delete','JTOOLBAR_EMPTY_TRASH');
        }

And add a hidden checkbox field in the view with the id variable [i.e. page id] in the view

0

精彩评论

暂无评论...
验证码 换一张
取 消