Welcome, Guest
Username: Password: Remember me

TOPIC: Creating a Control Panel for the Component

Creating a Control Panel for the Component 15 Dec 2011 08:36 #717

  • iconvisual
  • iconvisual's Avatar
  • Offline
  • Senior Member
  • Keen Joomla! 1.7 Developer
  • Posts: 53
  • Thank you received: 5
  • Karma: 1
Hello All,

Really enjoying Cook, it is amazing!

Does anyone have experience in how I might create a Control Panel for my Component.

i.e. When the Component is selected from the Back End instead of loading the default view I would like to display a Control Panel which then has buttons for each element of the Control Panel. Hope that makes sense.

As an example I can only draw attention to existing Components such as Akeeba (all), redSHOP, HikaShop etc. So that rather than having 20-30 sub menu items from my Component I can use a better selection method (Buttons etc.) from my Control Panel.

Any advice, suggestions, or examples would be greatly appreciated.

Kind Regards,

Ed.
Keen Joomla! and PHP/MySQL developer. Excited about J-Cook.
The administrator has disabled public write access.

Re: Creating a Control Panel for the Component 16 Dec 2011 09:19 #723

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 984
  • Karma: 140
Control Panel is on the roadmap fo the future.
For the moment, it is not possible to customize back-end menus, sub-menus, and CPanels.

- Create a new controller file, called maybe 'cpanel' (copy existing and rename / rewrite var and class names)
- Create a new VIEW directory called 'cpanel' in our example
- Don't create model because it is a menu and don't need database table. (If your menu is static)
- Create VIEW.HTML.PHP file
The display_XXX() function is the function to prepare objects for your layout. replace XXX with the name or your layout (maybe 'default' if your template file is 'default'.... In facts, it should be for this example)
- Create template file inside 'tmpl' directory. Name it 'default.php'
In this template file, try to copy how other components did it to get the same Joomla native style. Or copy the home back-end page.

- Then, if you want to acces this layout by default, find the way in the main file of your back-end. (com_mycomponent / mycomponent.php) in back of course.
- In the new controller file, add/modify lines in the display() function in order to load the right new template name.


Hope it can help you.
Coding is now a piece of cake
Last Edit: 16 Dec 2011 09:21 by admin.
The administrator has disabled public write access.
The following user(s) said Thank You: iconvisual, kristianharmer

Re: Creating a Control Panel for the Component 16 Dec 2011 09:25 #724

  • iconvisual
  • iconvisual's Avatar
  • Offline
  • Senior Member
  • Keen Joomla! 1.7 Developer
  • Posts: 53
  • Thank you received: 5
  • Karma: 1
Of course it helps! Thank you once again. The steps you have outlined are just what I need to get it done.
And of course I look forward to seeing this functionality on the road map one day soon!

Thank you,

Ed.
Keen Joomla! and PHP/MySQL developer. Excited about J-Cook.
The administrator has disabled public write access.
Time to create page: 0.096 seconds

Get Started