Asset loader based on @dongilbert asset loader ( https://gist.github.com/4205674 )
ELHtml::asset('style.css');
<?php | |
// Required objects | |
$input = JFactory::getApplication()->input; | |
// Get the form data | |
$formData = new JRegistry($input->get('jform', '', 'array')); | |
// Get any data being able to use default values | |
$id = $formData->get('id', 0); |
(function($){ | |
// AQUI TU CODIGO JS USANDO $ | |
})(jQuery); |
Asset loader based on @dongilbert asset loader ( https://gist.github.com/4205674 )
ELHtml::asset('style.css');
This document includes fast examples to use @mbabker's method to use the media folder to allow stylesheets and javascript overrides:
I have also added the method to use overridable images in the media folder.
<?php | |
// no direct access | |
defined('_JEXEC') or die('Restricted access'); | |
jimport('joomla.form.formfield'); | |
class JFormFieldBshead extends JFormField { | |
var $type = 'bshead'; |
<?php | |
defined('JPATH_BASE') or die; | |
jimport('joomla.html.html'); | |
jimport('joomla.form.formfield'); | |
jimport('joomla.form.helper'); | |
JFormHelper::loadFieldClass('list'); | |
class JFormFieldGooglefont extends JFormFieldList { |
<?php | |
$db = JFactory::getDbo(); | |
// Get the available offices | |
$offices = array(); | |
$officeFieldId = 5; | |
$query = $db->getQuery(true) | |
->select('field.extras') | |
->from('#__fieldsattach AS field') |
<?php | |
$doc = JFactory::getDocument(); | |
// Supposes you have a template setting with name loadJquery | |
$loadJquery = $this->params->get('loadJquery', 1); | |
if ($loadJquery) | |
{ | |
$removeJs = array( | |
'/jquery.min.js', |
<?xml version="1.0" encoding="utf-8"?> | |
<metadata> | |
<layout title="COM_MYCOMPONENT_TITLE_VIEW_LOGOUT" option="View"> | |
<message> | |
<![CDATA[COM_MYCOMPONENT_TITLE_VIEW_LOGOUT_DESC]]> | |
</message> | |
</layout> | |
<fields name="params"> | |
<fieldset name="basic"> | |
<field |