如何在Joomla中发送任务变量 [英] How to send the task variable in Joomla

查看:81
本文介绍了如何在Joomla中发送任务变量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在带有URL的joomla(virtuemart)中有一个菜单项

I have a menu item in joomla (virtuemart) with url

index.php?option=com_virtuemart&view=manufacturer

现在,在制造商视图的view.html.php中,我添加了一个名为jump as的函数

Now, in view.html.php of manufacturer view I added a function called jump as

function jump(){echo "hello";}

我在URL中添加了task = jump,使其变为

I added task=jump in the url so that it becomes

index.php?option=com_virtuemart&view=manufacturer&task=jump

但即使现在,默认显示功能仍在执行,而不是跳转功能.为什么?请帮我.谢谢

But even now the default display function executes and not the jump function. Why? Please help me. Thanks

推荐答案

此URL index.php?option=com_virtuemart&view=manufacturer&task=jump中的任务将执行默认控制器的jump功能.因此,如果controller.php中有任何功能jump将不执行view的跳转功能.如果要执行任何其他控制器的跳转,请使用此结构task=controllername.taskname

The task in this url index.php?option=com_virtuemart&view=manufacturer&task=jump will execute the jump function of default controller.So if there is any function jump in the controller.php will execute not the jump function of view.If you want to execute jump of any other controller use this structure task=controllername.taskname

了解更多- http://docs.joomla.org/JController_and_its_subclass_usage_overview https://groups.google.com/forum/?fromgroups=#!topic/joomla-dev-general/ZkNhbX2x1Es http://docs.joomla.org/How_Joomla_pieces_work_together

Read More - http://docs.joomla.org/JController_and_its_subclass_usage_overview https://groups.google.com/forum/?fromgroups=#!topic/joomla-dev-general/ZkNhbX2x1Es http://docs.joomla.org/How_Joomla_pieces_work_together

希望这很清楚.

这篇关于如何在Joomla中发送任务变量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆