7
votes
Joomla constant to current template path
Look at https://gist.github.com/leFlea-snippets/4602845
PHP: Joomla - Get active template path
// Get active template path from anywhere on Joomla:
$app = JFactory::getApplication();
$path = ...
6
votes
Accepted
Update Server for template
I think the article is not up-to-date because update server is working properly with template.
Here's the code I use in the templateDetails.xml
<updateservers>
<server type="extension" ...
6
votes
Accepted
How to get ALL params of object?
You can simply use the following:
$componentParams= JComponentHelper::getParams('com_content');
var_dump($componentParams);
This will provide an object like so:
object(Joomla\Registry\Registry)[...
4
votes
Accepted
Range form field type
When ever in doubt about Joomla's form fields, have a look at the following directory, where you will find each one.
libraries/joomla/form/fields
To get a range form field, you can use the ...
3
votes
Accepted
Creating a module and giving it config parameters options
Welcome to JSE.
I'm not sure which documentation you've been referring to, however the Joomla Docs show you how to add parameters to your module:
https://docs.joomla.org/J3.x:...
3
votes
Accepted
Module Template/alternate layout Name language Override
The layout language key is built like this:
$key = strtoupper($module . '_LAYOUT_' . $value);
Where $module is the module name (including mod_ prefix) and $value is the layout name. Example string ...
3
votes
How to change form values sent by a module?
If you're talking about module definition file that holds module options you can't do much in the file using framework it-self. But you can do it in 3 other ways.
In the UI by Java Script
Just create ...
3
votes
Accepted
Custom field colResizable plugin not working but works in fiddle
You are calling the colResizable jQuery plugin before the jQuery itself. It should be the other way round.
Also, Joomla's admin should also already have jQuery loaded, but that uses jQuery v1.12.4. ...
3
votes
Show 'menuitem' field name in frontend of module
You can use the following:
$menu = Joomla\CMS\Factory::getApplication()->getMenu();
$menuItem = $menu->getItem($menulink);
echo $menuItem->title;
If you var_dump($menuItem);, it will show ...
2
votes
Reset button for template parameters
Template style options are saved in #__template_styles.params.
A Protostar's sample saved params:
{"templateColor":"#696969","templateBackgroundColor":"#E3E3E3","logoFile":"","googleFont":"1","...
2
votes
Accepted
How to add attribute to <form> of backend for module
The short answer is there's an "easier" way. The assumption being you need to provide a means for a user to upload a file as part of the core configuration of the module. Since there isn't a ...
2
votes
Custom field colResizable plugin not working but works in fiddle
How about to change the $ sign with jQuery?
So the code would be
jQuery("#tableResizable").colResizable({
fixed:true,
liveDrag:true,
gripInnerHtml:"<div class='grip'>&...
2
votes
Accepted
Move the Joomla! module layout override to a different tab
I am losing you a little bit in your question.
Saying move the Joomla module layout override option, do you mean to display that field within another tab?
If so, what's the problem you are facing ...
2
votes
XML file does not upload with my custom module
The manifest (main xml) is the only file that doesn't need to be included in the manifest (ie itself). Other xml files need to be listed either as files or be in listed folders.
One attribute in the ...
2
votes
Accepted
Joomla 3 - How to set module params programmatically?
Yes you can save the params of the module programmatically by taking the instance of the extension table
1: JTable update
$table = JTable::getInstance('extension');
$table->load($moduleId);
$...
2
votes
Can't pass params to external php file
By looking at updated xml file, I see only one issue that you haven't used
<fields name="params"></fields> in config tag and hence your modparams object showing blank. Try below xml ...
2
votes
Accepted
<customContent /> or <field type="editor">
Well, I've just had my first case when using one or the other seems relevant.
In the database, Joomla's fields for both the "params" and the "content" fields of modules are of the type TEXT, which ...
2
votes
<customContent /> or <field type="editor">
I've tried doing some research on this of my own as I was interested to see what purpose it served.
Looking through some Github issues, it has been noted that customContent is valid, however ...
2
votes
Accepted
Joomla 4 - Module Backend Subform subform-row-add "row" not available
The way the event is invoked is slightly different for Joomla 4.
You can use the following:
$(document).on('subform-row-add', function(event) {
console.log(event.detail.row);
});
Or native ES6+ ...
2
votes
Accepted
subform inside subform in module
Access the link fields the same way you're accessing other fields, through the main activities field.
<?php foreach ((array) $activities as $activity) : ?>
<?php foreach ((array) $...
2
votes
Use different module settings/parameters on different posts in Joomla!
Joomla's design allows you to have multiple instances of modules to allow you to undertake what you've explained you're trying to do.
Basic Implementation
The assignments tab in the module settings ...
2
votes
Accepted
ModuleHelper::renderModule with custom parameters
Attributes aren't meant to be used inside module context and they're no longer passed there. They're now only available in module chromes. Short of stuffing properties into $module object there isn't ...
1
vote
Accepted
Show article details from custom module
As far as I know, the SQL form field will always return the ID of an article.
So you can get the title, into text and intro image, you can use Joomla's Table class:
use Joomla\CMS\Table\Table;
$...
1
vote
Accepted
Get module params in custom form field
Get the value from current form.
$bgcolor = $this->form->getField('bgcolor', 'params')->value;
1
vote
Module field type category not working
Joomshopping may have categories for the products, but it does not the Joomla core categories table/model for its categories. It has its own.
The categories field is for the Joomla core categories, ...
1
vote
How to add article links to module mod_articles_category?
Create an override for the module in templates/your_template/html/mod_articles_category/default.php
Add to the line 20 and 84 after li tag:
<?php
$params = $item->params;
$urls = ...
1
vote
Accepted
Joomla 3.6 nested subforms not saving
So far this is not yet possible to do in Joomla. Nested subforms or in other words multi level subforms is on the agenda. It's just hoping a good volunteer is ready to tacke this issue.
More info can ...
1
vote
Accepted
use Joomla Subform field values in custom field from same module
I solved this doing it a bit different.
B is done via this code which grabs all the inputs and converts them to a select box. Then when the user makes a selection it copies that selection to a normal ...
1
vote
Accepted
How to connect to DB in module's admin panel
For this, you can go with a custom form field type
In your form field, you can interact the way you want with the database and have your results printed in the module's admin panel.
Perhaps you ...
1
vote
Accepted
Module Development: What fieldset name do I need to use to add JFields to the tabs: Menu Assignment & Module Permissions
Unfortunately you can not add custom fields to "Menu assignment" & "Module Permissions" tabs, because these are only for core features.
You have three options:
Module tab
<fieldset name="...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
module-params × 60module × 28
joomla-3.x × 18
php × 8
custom-module × 8
xml × 7
templates × 4
joomla-3.4 × 3
custom-field × 3
module-display × 3
joomla-2.5 × 2
development × 2
extensions × 2
mysql × 2
javascript × 2
menu × 2
joomla-3.6 × 2
template-override × 2
form-fields-types × 2
front-end × 2
joomla-4.x × 2
subform × 2
administrator × 1
joomla-api × 1
database × 1