Hot answers tagged

2

If you're using ChosenJS, which is the fancy select library that Joomla 3.x uses, then you'll need to manually instruct it to update the list, because it doesn't use any observers by default. You can do this by using the following: jQuery('#jform_identificator').trigger("chosen:updated");


1

You'd be best off using the jQuery global scope and passing $ as an alias inside the function instead: jQuery(document).ready(function($) { This helps prevent any conflicts with other 3rd party libraries that also use the $ namespace.


1

What you should do is include &format=json in your URL. This tells Joomla that you want a JSON response rather than HTML, and it won't run (subsequently) your template to produce all your page HTML. The usual approach is to call parent::display() in your controller code (ie in submit()). This will cause Joomla to look for a display() function in a ...


1

This is handled by System - SEF plugin. It will not work with page content added using JavaScript. You'll have to handle this in your code.


1

Administrator side's ContentModelArticles does not support filtering by ID. ContentModelArticle does support it. The state property name is article.id: $model->setState('article.id', $articleId); If this is a frontend module you might want to use the frontend articles model: // Register frontend model classes. JModelLegacy::addIncludePath(JPATH_SITE ....


1

I think what you're looking for is self which can allow your static methods to call other static methods. Without any indication of state and db calls in your question it's difficult to tell what the various methods need. It is uncommon to use global functions at all in Joomla, and 10 times as uncommon to declare functions in a method. Do let me know if ...


1

If you still want to use the frontend urls from backend, make sure to call the frontend site appropriately. Your should use Juri::root() to get site url from administrator instead of Juri::base() or Juri::current(). Juri::root() --> http://mysite.local Juri::base() --> http://mysite.local/administrator Juri::current() --> http://mysite.local/...


Only top voted, non community-wiki answers of a minimum length are eligible