what is difference between view and task in joomla 2.5 and what is url structure in joomla 2.5?(joomla 2.5 中的视图和任务有什么区别,joomla 2.5 中的 url 结构是什么?)
问题描述
我是 joomla2.5 的新手,我正在开发一个表单组件,它可以简单地从用户那里获取数据并保存到数据库,但我对表单重定向感到困惑.
请告诉我这是什么意思:
index.php?option=com_users&task=registration.register
请给我定义task=registration.register",也包括点.
index.php?option=com_test2&view=test2
请定义视图和任务之间的区别以及什么是 joomla2.5 url 结构基础.
谢谢你的问候
在 Joomla 中,
View 代表组件视图.一个组件有多个视图,比如 Joomla 默认组件 com_users 有不同的视图
注册、简介等
Task 表示控制器文件中的函数.
喜欢这里
index.php?option=com_users&task=registration.register
registration
控制器有一个带有 register
在视图中
index.php?option=com_test2&view=test2
表示组件 com_test2
有一个带有 test2
在其他方式中,您可以使用隐藏字段访问控制器内的 register
功能.如果你有一个表单要提交,那么就像这样.
<input type="hidden" name="controller" value="registration"/><input type="hidden" name="task" value="register"/>
您可以从此处
希望它有所帮助..
I'm new to joomla2.5 and i'm working on a form component that will simple get data from user and save to database but i have confusion regarding form redirect.
please tell me what means of this:
index.php?option=com_users&task=registration.register
please define me "task=registration.register" including dot also.
index.php?option=com_test2&view=test2
please define different between view and task and what is joomla2.5 url structure fundamentals.
Thanks with regards
In Joomla,
View stands for component views. A component have multiple views like Joomla default component com_users have different views
registration,profile etc
Task means the function inside your controller file.
like here
index.php?option=com_users&task=registration.register
registration
controller have a function name with register
In the view
index.php?option=com_test2&view=test2
means component com_test2
have a view folder with test2
In other way you can access the register
function inside your controller is by using hidden fields. If you have a form to submit then something like.
<input type="hidden" name="option" value="com_users"/>
<input type="hidden" name="controller" value="registration"/>
<input type="hidden" name="task" value="register"/>
You will get more details about Joomla component structure from here
Hope its helps..
这篇关于joomla 2.5 中的视图和任务有什么区别,joomla 2.5 中的 url 结构是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:joomla 2.5 中的视图和任务有什么区别,joomla 2.5 中的 url 结构是什么?


- 如何定位 php.ini 文件 (xampp) 2022-01-01
- 正确分离 PHP 中的逻辑/样式 2021-01-01
- SoapClient 设置自定义 HTTP Header 2021-01-01
- Mod使用GET变量将子域重写为PHP 2021-01-01
- Laravel 仓库 2022-01-01
- 带有通配符的 Laravel 验证器 2021-01-01
- PHP Count 布尔数组中真值的数量 2021-01-01
- 没有作曲家的 PSR4 自动加载 2022-01-01
- 从 PHP 中的输入表单获取日期 2022-01-01
- Oracle 即时客户端 DYLD_LIBRARY_PATH 错误 2022-01-01