Excerpt from edit.php:
<!-- CustomFields TAB -->
<?php
if ($rules->uploads_use_tabs) {
if (ComponentHelper::isEnabled('com_fields') && $params->get('custom_fields_enable') == 1){
$this->ignore_fieldsets = array('general', 'info', 'detail', 'jmetadata', 'item_associations');
echo LayoutHelper::render('joomla.edit.params', $this);
}
} ?>
No else path given ==> custom fields not rendered in non-tabs case.
Bug or feature?
Best regards
Michael
Hi,
Could you please advise where you found the code fragment
Thanks
Colin
Line 628 in edit.php.
Path in .ZIP: \com_jdownloads\site\tmpl\form\edit.php
Path on server: /components/com_jdownloads/tmpl/form/edit.php
Hi
These Custom Fields were used in jDownloads 3.2 but when updating to jD3.9 they were converted to regular Joomla Custom Fields.
So I think the code you found is perhaps a 'leftover' and is not required any more.
No doubt Arno will clarify/confirm.
Colin
PS see article https://www.jdownloads.net/documentation/general-items-v3-9/fields-in-jdownloads
Quote from: michpaule on 09.04.2023 14:57:13
Line 628 in edit.php.
Path in .ZIP: \com_jdownloads\site\tmpl\form\edit.php
Path on server: /components/com_jdownloads/tmpl/form/edit.php
Seems to be a bug. I will check this in detail.
Thanks Arno and Colin,
currently I'm using the following workaround:
<?php
if ($rules->uploads_use_tabs) {
if (ComponentHelper::isEnabled('com_fields') && $params->get('custom_fields_enable') == 1){
$this->ignore_fieldsets = array('general', 'info', 'detail', 'jmetadata', 'item_associations');
echo LayoutHelper::render('joomla.edit.params', $this);
}
} else {
// Use customized layout (see $basepath)
if (ComponentHelper::isEnabled('com_fields') && $params->get('custom_fields_enable') == 1){
$this->ignore_fieldsets = array('general', 'info', 'detail', 'jmetadata', 'item_associations');
echo LayoutHelper::render('edit.params', $this, $basePath);
}
} ?>
I copied params.php from /layouts/joomla/edit to /administrator/com_jdownloads/layouts/edit and modified it there.
Just removed the tabs stuff and replaced fieldsets with divs.
For me the result is perfectly fine.
But there might be better (official) ways.
Best regards
Michael
Okay. Seems to be correct for your case. ;)
In 'front end' Options - 'Use tabs in the Download details view' I had set to Tabs.
Seems to work AOK.
Did not test for adding any custom tabs
Colin
Hi Colin,
yes it works with activated tabs option, but only in this case! This was also described in the old options description:
COM_JDOWNLOADS_USERGROUPS_UPLOAD_USE_TABS_DESC="Shows Upload details in a tabbed form or as a sequential List. A sequential list is useful if the user is only being asked for a few details. Default is Yes. Note: if you wish to edit Fields or Field Groups from the frontend then this option must be set to Yes."
This is now changed to:
COM_JDOWNLOADS_USERGROUPS_UPLOAD_USE_TABS_DESC="Shows Download fields in a tabbed form or as a sequential List. A sequential list is useful if the user is only being asked for a few details. Default is Yes. Note: Self-created fields or field groups are always displayed within a tab."
And in the attached file changed the script to get this (now correct) output. See pics with and without enabled 'tabs' option.
Will be a part from next 4.0.25 release (together with the changed language files).
Arno
Thanks for the explanation but I am a little confused!!
Presently COM_JDOWNLOADS_BACKEND_SET_USE_TABS_DESC reads as below.
COM_JDOWNLOADS_BACKEND_SET_USE_TABS_DESC="If set to sliders or tabs then three additional fields are shown below allowing you to optionally specify the label of up to three additional sliders or tabs. When the tabs option is set to Yes then special placeholder variables may be used in your details layout to view tab content. The layout of a tab may be changed in the jdownloads_fe.css file. See also details about layouts and read the FAQ."
Also as in another case perhaps the above should refer to jdownloads_custom.css rather than jdownloads_fe.css
Colin
Should I have mixed something up? ::)
I'll check again at my leisure.
Please see pics.
This are two different things.
Input and output.
Arno,
In User Groups setting 'Use Tabs in Frontend Upload Form' the DESC is
"Shows Upload details in a tabbed form or as a sequential List. A sequential list is useful if the user is only being asked for a few details. Default is Yes. Note: if you wish to edit Fields or Field Groups from the frontend then this option must be set to Yes."
Think the part about being needed for editting in frontend should be retained.
Adding
"Note: Self-created fields or field groups are always displayed within a tab."
would also be useful
Colin
Quote from: ColinM on 12.04.2023 23:22:53
Arno,
In User Groups setting 'Use Tabs in Frontend Upload Form' the DESC is
"Shows Upload details in a tabbed form or as a sequential List. A sequential list is useful if the user is only being asked for a few details. Default is Yes. Note: if you wish to edit Fields or Field Groups from the frontend then this option must be set to Yes."
Think the part about being needed for editting in frontend should be retained.
Adding
"Note: Self-created fields or field groups are always displayed within a tab."
would also be useful
Colin
I don't understand your problems with my (small) changes (see pic). Your quotes are from an older version, my text from 4.0.25. Or is it not correct English?