Tuesday, 30 October 2012

Where to stick a function in your MVC Joomla Module

The situation was this:  I had some code copied from a website that I want to put in the output of the module.

Even if I wanted to ( which I don't ) I wouldn't be able to copy and paste it into the tmpl/default.php file; as some of the code is built into function. 

Here's what you can do with the functions; so that you can use them from this file or anywhere else in the module. 

OPEN your helper.php  or controller.php file and put the function before the closing }

you can then call up this function with something like.


No comments: