Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

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

  • iconvisual
  • iconvisual's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
  • Keen Joomla! 1.7 Developer
  • Posts: 53
  • Thank you received: 5
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.

Please Log in or Create an account to join the conversation.

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

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
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
The following user(s) said Thank You: iconvisual, kristianharmer

Please Log in or Create an account to join the conversation.

Last edit: by admin.

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

  • iconvisual
  • iconvisual's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
  • Keen Joomla! 1.7 Developer
  • Posts: 53
  • Thank you received: 5
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.

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Time to create page: 0.055 seconds

Hi All just wanted to add one more "thank you" voice to all those who discovered the value of this amazing application. The website I was working on went to production few days ago and I do not want to even try to imagine what would it take to build it without j-cook. So - endless thanks keep it running and evolving I believe it deserves to be the core tool for any joomla application! Thanks!
Michael (bmk028 - Forum)  

Get Started