开发者

Joomla - configuring basic parameteres for my component in menu manager

Im still relatively new to Joomla component development.

I have a component that manages rsvps to events. In the administration side you create various events and specify the details of when where and what time the event starts etc. Each event has an eventid.

In the frontend I want to be able to show a spe开发者_运维知识库cific events details when a menuitem is clicked.

In Joomla administration, my thinking is as follows:

1) Go to Menus->Top Menu

2) Click on [New] to create a new Top Menu Item

3) My component is listed there as MyRSVPComponent

But when I click on it, nothing happens??

All the other default components like search have submenus that you can click on that takes you to a Menu Item page and you are able to configure the Basic Parameters on the right hand side.

I want my component to behave like that as well and I want to be able to pick the event from a list that I want displayed for that menu item. How would I go about doing this?

Please do note that I have not followed the Joomla 1.5 MVC structure for my component. Can I still make this work, or am I forced to create the project with the MVC structure. I have my reasons for not wanting to go with MVC for this particular project so please do not just suggest that I go MVC unless that is the ONLY way that I going to achieve what I need to do.


The options you see in the menus are controlled directly by the views in your component. You will need a view for each menu item type you would like to have. You don't have to go MVC but it would certainly make life easier.


I just came across this question with the view to integrate a Symfony project into a Joomal component. Naturally I don't want to use the Joomla MVC for this as well.

I have done some debugging on how to create your menu links:

  • You need to have the link field set for your component, matching your component folder
  • You need to have the views folder, matching the "option" field value of your component database entry

As soon as you have this, the menu manager is going to show your views as options

To have specific view sub options, you need to create /com_yourcomponent/views/yourview/layout.xml, copy these from com_content. In there you can also define your menu options.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜