what is difference between view and task in joomla 2.5 and what is url structure in joomla 2.5?

后端 未结 1 1900
轻奢々
轻奢々 2020-12-20 05:35

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.

ple

相关标签:
1条回答
  • 2020-12-20 06:12

    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..

    0 讨论(0)
提交回复
热议问题