I am developing a custom module in Joomla4 alpha, using a bootstrap rendered modal window so that the user of the component will assign images from media in the Joomla back end to the extension gallery.
In Joomla3.x, there are insert and close buttons when the modal window comes up.
In Joomla4, there is not or I am missing something?
$html .= JHtmlBootstrap::renderModal(
'myModal',
array(
'url' => Uri::root() . 'administrator/index.php?option=com_media&tmpl=component&e_name=myslideimgname&asset=com_modules&author=&path=' . '&' . JSession::getFormToken() . '=1"',
'width' => '620px',
'height' => '390px'
)
);
In Joomla3.x, there is view=images
in which the two buttons were added in its layout, in Joomla4 alpha there is not such a view, only file and media views.
The way around this problem is to make the user create a folder in the images folder of Joomla, add images there, then read those images in the layout of the extension from the folder.
However, if there is a solution to add the insert button, I would rather employ it.
url
value reminded me to ask this question. Please consider adoptinghttp_build_query()
to improve stability and readability. This will help to prevent typos (like"
at the end).http_build_query()
is 1. not a surprise to me, 2. likely due to so many Joomla devs being predisposed to "copy-pasting what has worked before", 3. probably because they are unaware that the function exists. Just because lots of people in a demographic aren't doing something, doesn't mean that something shouldn't be done. I am here to inform and educate ...and receive help when I need it.