I'm creating a custom component for Joomla 3.x, but I'm stuck with a problem for more than one day. My goal seems to be simple, but I can't make it work.
My component have backend and frontend parts, I only want create a JHtml helper so I can write JHtml::_('mycomponent.searchtool.form') but always get a 500 Error about it's not found.
I created a very simple helper, and try to call it from my templates with no luck:
<pre>
component/
com_mycomp/
helpers/
html/
prueba.php
</pre>
And the file contains:
<pre>
<?php
defined('JPATH_PLATFORM') or die;
abstract class JHtmlPrueba {
public static function main() {
return "Hello cruel World!!";
}
}
</pre>
And try to call it from my JLayout that reside on '/component/com_mycomp/layouts/...', my layout are loaded correctly, but the JHtml helper not load, I try to put in helpers root folder, in libraries folder of joomla, and some other places without luck:
<pre>
...
JHtml::_('prueba.main');
...
</pre>
Where is the place to put JHtml helpers to be availabe for the component, can I make it available to all components / modules?.
Regards.
My helper is a new one, but if I want to override a joomla provided one, i need to make it manually?