Questions tagged [custom-component]
For questions related to custom component development
13
questions
5
votes
1
answer
493
views
How to generate a dynamic note field for a custom component?
I am attempting to develop my first custom component called com_image. Because of the structure and function of my project requirements, it made best sense to clone the com_contact folder and ...
2
votes
1
answer
711
views
Importing Joomla CMS to custom PHP script (outside root folder)
I am trying to import Joomla CMS to a custom PHP script by this :
define( '_JEXEC', 1 );
define( 'JPATH_BASE', realpath(dirname(__FILE__).'/' ));
require_once ( JPATH_BASE .'/includes/defines.php' );...
4
votes
1
answer
1k
views
with insert on duplicate key update - updating multiple rows at once
With latest joomla version I try to achieve one query to the database and updating multiple rows at once.
I want to make a query like this:
INSERT INTO `tablename`
(`id`,`date`) VALUES
('79','2018-...
3
votes
1
answer
2k
views
How to use HTMLHelper to add to the document head
In this post: How to add CSS/JS/an Image to a module backend @lodder shows me how to use HTMLHelper to add CSS and JavaScript.
Previously I had followed the Joomla! documentation https://docs.joomla....
2
votes
2
answers
762
views
Call Controller's Publish-Method from CLI or Helper
I would like to call the publishing-method I defined in my item's controller from a CLI-script or a helper (which is included in the CLI).
The best case would be to call it like this:
$...
2
votes
1
answer
184
views
Save multiple fields in DB
Please help advice. How to save multiple Fields in the database. I have a form with X number of fields. Fields added using JQuery
<input type="text" value="" name="jform[phone]">
<input type=...
2
votes
1
answer
2k
views
Manually render filter form fields in layout
I am using the searchtools filters in the front end of a custom component.
So I am displaying the fields in my template :
<?php echo JLayoutHelper::render('joomla.searchtools.default', array('...
1
vote
1
answer
308
views
Load language files inside custom library
I have a a library inside \libraries\mylib\.
That library contains an include.php which uses following to load language files that are also inside a /language folder in the library:
$lang = JFactory:...
1
vote
1
answer
59
views
What is the best way to have pages displaying articles from our custom content table in Joomla 4.1?
Related: Is it possible to make it so that authors can edit their own published articles creating a new unpublished version of them?
The answer to that question is "In Joomla 4 it is, but authors ...
1
vote
2
answers
728
views
How to dynamically reload admin-form-fields in Joomla
In a custom component, I'm developing an admin form with 2 fields, a combo-box for jobTitles and checkboxes for technologies. Both fields are loaded from a database table.
The values of the checkbox ...
1
vote
1
answer
133
views
How to debug an empty Bootstrap error generated by non-empty Tags field in a custom component?
Flowing on from my previous question about writing my first component (now called com_picture) which is nearly an exact clone of the com_contact directory, I have hit a snag with trying to save a new "...
1
vote
1
answer
629
views
Custom form field not working on server
I created a custom component and in the form one custom field categoryList to list all categories dynamically. Following is the code:
formname.xml
<fieldset addfieldpath="/administrator/...
1
vote
1
answer
235
views
Multiple templates for the same view of a custom component
In my custom component, I would like to have multiple slightly different templates for the same view.
Something like
com_things/
...
- views/
- thing/
...
- things/
- tmpl/
...