Skip to main content

New answers tagged

0 votes

How do I copy a template

Template copying is a old way for users to customize templates without losing changes. It has many issues. For example, it cannot rename PHP classes and language constants. Which eventually leads to ...
Sharky's user avatar
  • 11.3k
1 vote
Accepted

Joomla 4 / 5 - Custom Field Plugin

You need to register namespace for field class lookup: \Joomla\CMS\Form\FormHelper::addFieldPrefix('NXD\\Plugin\\Fields\\NXDFolderList\\Field'); And also fix capitalization of field type. It is ...
Sharky's user avatar
  • 11.3k
1 vote
Accepted

How to set and use a global variable within a content plugin?

Normally plugins in Joomla are instantiated only once per request. So using a class member variable is the cleanest solution: use Joomla\CMS\Event\Content\ContentPrepareEvent; use Joomla\CMS\Plugin\...
Sharky's user avatar
  • 11.3k
1 vote
Accepted

Scheduled Task - Plugin to use Rules

Apparently, the entire task object is passed to the event but there is no proper method for retrieving it. So you have to resort to using getArgument(): $rules = $event->getArgument('subject')->...
Sharky's user avatar
  • 11.3k
1 vote

Scheduled Task - Plugin to use Rules

Looking at the code in /administrator/components/com_scheduler/src/Task/Task.php the execution_rules aren't included in the event. So going from the code there: $event = AbstractEvent::create( '...
Robbie Jackson's user avatar
1 vote
Accepted

Joomla Custom Field Type Plugin No Translateable Label

If you look at other language constants, you'll see they follow PLG_FIELDS_{ELEMENT}_LABEL pattern. You need to add PLG_FIELDS_NXDFOLDERLIST_LABEL language constant to your language file. Ideally, all ...
Sharky's user avatar
  • 11.3k
2 votes
Accepted

Component with a module included - JED Checker

<modules> and <plugins> elements are not part of component manifest schema. They are not used by Joomla in any way. You must be using custom code in your install script to install/...
Sharky's user avatar
  • 11.3k
0 votes

J5 - Utilising com_fields in component

Well I think I have it although if anyone else can suggest a better way, please do. So basically I have create xml entry for the field and have an empty fieldset/group in the form xml proper. ...
Glenn Arkell's user avatar

Top 50 recent answers are included