0

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.

Mohammed Nagoor
  • 884
  • 2
  • 12
  • 25
  • If you look in the view.html.php for the article list, you will see it's a custom button `JToolBarHelper::custom()`. Providing those options and changing the state of it will be a lot of code and I doubt very much you will be provided with it, therefore I recommend you go to administrator/components/com_content and look through the php files there. – Lodder Sep 06 '12 at 12:12
  • Thank's for your reply.I have already check with that files. There we can assign only the bulk of article to the `featured` list using the `JToolBarHelper::custom('articles.featured', 'featured.png', 'featured_f2.png', 'JFEATURED', true);` . But we can't assign `unfeatured` for the bulk of articles. – Mohammed Nagoor Sep 06 '12 at 12:29
  • 1
    when you go into the "featured" tab in the article manager, so that only the featured articles are shown, there is a button called "remove", so ther code assigned to this button is what you need ;) – Lodder Sep 06 '12 at 12:32
  • thanks Lodder. you are right, i got the result :) – Mohammed Nagoor Sep 06 '12 at 12:43
  • Nice one. Glad you solved it. You should answer the question and mark it as solved. – Lodder Sep 06 '12 at 12:45

1 Answers1

2

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.

Mohammed Nagoor
  • 884
  • 2
  • 12
  • 25