user1877095
user1877095

Reputation: 75

How to send the task variable in Joomla

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

Upvotes: 0

Views: 993

Answers (1)

Irfan
Irfan

Reputation: 7059

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.

Upvotes: 2

Related Questions