11
votes
Accepted
Module parameters in main tab
Use <fieldset name="basic"> instead of <fieldset name="options" label="My Parameters">
Then name of fieldset must be basic otherwise it will create a new tab.
6
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 ...
4
votes
Accepted
Show module only on the start page
Since a module is assigned on a specific item id, then it will be displayed, when this itemid exists in the url.
You could create a specific menu item, probably hidden, for the display of the links, ...
4
votes
Accepted
Get module parameters using loop
I'll go a little more in-depth with the repeatable form fields method.
Firstly, I would use 1 repeatable form field for all names, another for all logos and so on. So here would be the form field for ...
3
votes
Get module parameters using loop
I would like to preface this answer with the statement this is not the ideal solution for storing and retrieving a dynamic list of parameters. The "proper" way would be to use a custom table in your ...
3
votes
Get module parameters using loop
if you using joomla 3.2+ you can use repeatable field or if you are using 3.1 and older it's recommended to create your own field contains array of fields.
so you end up with $params->get('company'...
3
votes
Accepted
Is this a route loop?
We made this problem go away by updating Joomla to 2.5.24 (a painless point-release upgrade) and updating Document Seller to its 3.5 version, and the problem described above resolved itself exactly as ...
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
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
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
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
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
Accepted
How can I modify/control the HTML output of my Module?
case 'image':
$result = '<img src="' . $field_value . '" />';
break;
How about this for example?
2
votes
Hiding and showing fields based on menu item
You can detect the Browser (mobile or not) to show the fields. For example: Android, Blackberry, IE Mobile, iPad, iPhone, iPod Touch, NetFront, Nokia, Opera Mini, Opera Mobile, UC Browser.
You can ...
2
votes
Accepted
Show module field data in frontend
You access the parameter like you would any other parameter like so:
$params->get('image-1');
And to display the image, you can use the following:
<img src="<?php echo JUri::root() . $...
2
votes
SimpleCalendar - display category in module
I don't know if this is the correct way but it works for me.
In the helper.php located in modules/mod_simplecalendar, add the following:
$query->select('c.title AS category');
// Load the ...
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
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
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
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
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
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
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
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) $...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
module-params × 57module × 25
joomla-3.x × 18
custom-module × 8
php × 7
xml × 7
templates × 4
joomla-3.4 × 3
custom-field × 3
module-display × 3
joomla-2.5 × 2
mysql × 2
javascript × 2
menu × 2
joomla-3.6 × 2
form-fields-types × 2
front-end × 2
joomla-4.x × 2
subform × 2
development × 1
extensions × 1
administrator × 1
joomla-api × 1
database × 1
overrides × 1