Calculate data once, use site wide

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

Moderators: ooffick, General Support Moderators

Forum rules
Locked
sandomatyas
Joomla! Intern
Joomla! Intern
Posts: 54
Joined: Mon Jun 19, 2017 10:57 am

Calculate data once, use site wide

Post by sandomatyas » Thu Nov 22, 2018 3:19 pm

I build a Joomla + VirtueMart based shop with custom modules, custom plugins, a lot of template overrides.
There are some custom functions which I need several places site-wide. Like I store data in the database and I need this data in modules, in plugins or several overrides, etc.
It would be great to fetch this data from the database only once and use this everywhere where I need it.
Could you help me how should I do this?
With a system plugin? Or a library?
How should I pass the data to the scripts?
I also need custom functions (custom date formating, string manipulation etc) and it would be great to define these functions only once.

Basically I need my custom script pack with my custom functions, fetch the data only once per pageload and I need to access these functions and data from every components, modules, plugins, template.

Could you please help me how should I start with this?

Locked

Return to “Joomla! 3.x Coding”