help to better help you:

Please: add always Joomla / JEM version and details to your posts, so we can try to reproduce your issue!

info: how to use custom jhtml code

info: how to use custom jhtml code

11 years 1 month ago
#11254
Perhaps better to it in a wiki but will write some info for in the reference.


What do i mean with custom jhtml?
With that i meant jhtml that can be defined in an helper file of JEM or other component and can be called in a page.

For example this is how it's called in com_templates
Code:
<?php echo JHtml::_('templates.thumb', $this->template->element, $this->template->client_id); ?>

The templates is referring to the templates class and it's added in that page by adding this line
Code:
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');

The class that's being referred to is called
Code:
class JHtmlTemplates

And there is a function called "thumb"


So like this you can define things in a helper and use a small line within the template pages.

Please Log in or Create an account to join the conversation.

Time to create page: 0.515 seconds