J4 Module params in Helper

For Joomla! 4.x Coding related discussions, you could also use: http://groups.google.com/group/joomla-dev-general

Moderators: ooffick, General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Locked
EdwardLang
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Sat Sep 24, 2022 11:16 am

J4 Module params in Helper

Post by EdwardLang » Sat Sep 24, 2022 11:37 am

Hello All,

I am trying to get the module config params in the Helper file. In the default.php I use:

Code: Select all

$params->get('something');
Any help is appreciated..

User avatar
pe7er
Joomla! Master
Joomla! Master
Posts: 24985
Joined: Thu Aug 18, 2005 8:55 pm
Location: Nijmegen, Netherlands
Contact:

Re: J4 Module params in Helper

Post by pe7er » Mon Sep 26, 2022 2:34 pm

Welcome to Joomla forum!

How do you load the helper file in your default.php?
Do you use namespaces?

Maybe my small Joomla 4 module which works with parameters might help you a bit about how you can implement getting the parameters: https://github.com/pe7er/mod_db8sitelastmodified

Extensive documentation on Joomla 4 extensions (including modules) is available here:
https://blog.astrid-guenther.de/en/joom ... -schritte/
Kind Regards,
Peter Martin, Global Moderator
Company website: https://db8.nl/en/ - Joomla specialist, Nijmegen, Netherlands
The best website: https://the-best-website.com


Locked

Return to “Joomla! 4.x Coding”