How can we add featured and unfeatured options for component in the admin backend
-
30-06-2021 - |
Question
How can we add featured
and unfeatured
options for component in the admin backend.
I tried using the article manager (com_content)
. There we can select number of article and changes as featured. But there is no option for unfeatured in toolbar
.
I have to add the featured options like publish/unpublish
toolbar.
Thanks in advance.
Solution
I got the result. This is the following code to done the result.
In view.html.php
add the follwing line for the unfeature toolbar.
JToolBarHelper::custom('featured.delete', 'remove.png', 'remove_f2.png', 'JTOOLBAR_REMOVE', true);
In featured
controller, there is a function(delete)
to remove the featured one to unfeatured.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow