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 结构是什么?
基础教程推荐
- 如何在 Laravel 中使用 React Router? 2022-01-01
- YouTube API v3 点赞视频,但计数器不增加 2022-01-01
- PHP 类:全局变量作为类中的属性 2021-01-01
- 学说 dbal querybuilder 作为准备好的语句 2022-01-01
- PHP PDO MySQL 查询 LIKE ->多个关键词 2021-01-01
- 在PHP中根据W3C规范Unicode 2022-01-01
- Cron Jobs 调用带有变量的 PHP 脚本 2022-01-01
- 有什么方法可以用编码 UTF-8 而不是 Unicode 返回 PHP`json_encode`? 2021-01-01
- 如何在 Laravel 5.3 注册中添加动态下拉列表列? 2021-01-01
- 如何替换eregi() 2022-01-01
