Joomla - 在菜单管理器中为我的组件配置基本参数
我对 Joomla 组件开发还比较陌生。
我有一个管理事件回复的组件。 在管理方面,您创建各种事件并指定事件开始的时间和地点等详细信息。每个事件都有一个 eventid。
在前端,我希望能够在单击菜单项时显示特定事件的详细信息。
在Joomla管理中,我的想法如下:
1)转到菜单->顶部菜单
2)单击[新建]以创建一个新的顶部菜单项
3)我的组件在那里列为MyRSVPComponent
但是当我单击它时,什么也没发生??
所有其他默认组件(例如搜索)都有子菜单,您可以单击这些子菜单进入菜单项页面,并且可以在右侧配置基本参数。
我希望我的组件也有这样的行为,并且我希望能够从要为该菜单项显示的列表中选择事件。我该怎么做呢?
请注意,我的组件没有遵循 Joomla 1.5 MVC 结构。 我仍然可以完成这项工作吗?或者我是否被迫使用 MVC 结构创建项目? 我有理由不想在这个特定的项目中使用 MVC,所以请不要只是建议我使用 MVC,除非这是我实现我需要做的事情的唯一方法。
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 specific 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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您在菜单中看到的选项直接由组件中的视图控制。您将需要一个您想要的每个菜单项类型的视图。您不必采用 MVC,但它肯定会让生活变得更轻松。
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.
我刚刚遇到这个问题,目的是将 Symfony 项目集成到 Joomal 组件中。当然,我也不想为此使用 Joomla MVC。
我已经对如何创建菜单链接进行了一些调试:
匹配一旦你有了这个,菜单管理器就会将你的视图显示为选项
要具有特定的视图子选项,你需要创建/com_yourcomponent/views/yourview/layout.xml,从com_content复制它们。您还可以在那里定义菜单选项。
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:
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.