Richard
Richard

Reputation: 733

Joomla Component administration - link to different views

I have created a component in Joomla following the tutorial and I am using the MVC model. In the administration page, I can see everything from the default view but I don't know how to add a menu in there to access different views.

In the site it is easy as I link the menus to the different views but how can I achieve this in the administration part of the site?

When I click on the component in the admin part, I would like to have a menu to go to the different views. I could create links and a new menu myself but I hope there is something in Joomla to integrate this.

Thanks for the help.

Upvotes: 0

Views: 357

Answers (1)

Gaurav
Gaurav

Reputation: 28755

In the installation xml file of your component you can add some code, whihc will automatically create some menus in Joomla Menu => components => yourComponent =>

<menu>COM_ABC</menu>
<submenu>
   <menu view="config">COM_ABC_CONFIG</menu>
   <menu view="view1">COM_ABC_VIEW1</menu>
   <menu view="view2">COM_ABC_VIEW2</menu>
</submenu>

If you are using Joomla 3.x then you can render this menus in your screens also by rendering menu layout. Probably this function JHtmlSidebar::render(); can help you.

Upvotes: 1

Related Questions