开发组件:菜单项错误
我正在尝试根据本教程学习如何开发 Joomla 组件: http://docs.joomla.org/Developing_a_Model-View- Controller_(MVC)_Component_for_Joomla!1.6_-_Part_01
我正在学习第 4 部分。我的问题是我构建组件并将其压缩,然后安装。但是 Joomla 在文件夹和菜单项中的组件名称后面添加了“组件”一词。 例如,假设我的组件名称是“stack”。所以它是“com_stack”。我就是这样构建的,当我安装它时,/components
和/administrator/components
中的文件夹是“com_stackcomponent”
。组件菜单下的链接是 "administrator/index.php?option=com_stackcomponent"
所以它不会打开它。
我可以手动更改文件夹名称,但如何更改菜单下的链接?
或者说,如何从一开始就解决呢?
I'm trying to learn how to develop a Joomla component, according to this tutorial:
http://docs.joomla.org/Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.6_-_Part_01
I'm on Part 4. My problem is that I build the component and zip it, then install. But Joomla adds -"component" word after my component's name, in folders and in menu item.
For example, let's say my component's name is "stack". So it's "com_stack". I build it that way, when I install it, folders in /components
and /administrator/components
are "com_stackcomponent"
. And the link under Components menu is "administrator/index.php?option=com_stackcomponent"
So it doesn't open it.
I can manually change folders' names, but how to change the link under menu?
Or, how to solve it from the beginning?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这样做是因为您停在 17 个步骤中的第 4 步。几个步骤之后,它解释了如何正确命名组件。
Its doing that because you stopped at step 4 of 17 steps. A few steps later it explains how to properly name the component.
要修复菜单中的链接,请转到 phpMyAdmin 并搜索“stackcomponent”,然后进行相应的编辑。
不幸的是,它并不能真正解决您的问题 - 我没有使用过 Joomla 1.6,所以不知道为什么它会这样做。
To fix the link in the menu, go to phpMyAdmin and search for "stackcomponent", then edit accordingly.
Unfortunately its not really a solution to your problem - I've not used Joomla 1.6 so don't know why it would be doing that.