问题
I have a menu item in joomla (virtuemart) with url
index.php?option=com_virtuemart&view=manufacturer
Now, in view.html.php of manufacturer view I added a function called jump as
function jump(){echo "hello";}
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
回答1:
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
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
Hope this is clear.
来源:https://stackoverflow.com/questions/14535282/how-to-send-the-task-variable-in-joomla