Friday, 04 August 2023
  2 Replies
  313 Visits
0
Votes
Undo
I'm trying to override function getCal() in /modules/mod_jevents_cal/tmpl/default/calendar.php. My intent is to remove the HTML division at line 207 and the </div> tab at line 237.

I'm following the instructions at Customising Layouts - Template Override Basics. So far I have successfully overridden two JEvents calendar files. My overrides are /templates/protostar/html/mod_jevents_cal/flat/calendar.php and /templates/protostar/html/com_jevents/flat/year/listevents_body.php. Those work well.

In order to modify the other calendar.php file, I have copied it into the /templates/protostar/html/mod_jevents_cal/default/ directory. Then at line 20 I edited the class name from DefaultModCalView to OverrideDefaultModCalView, Further I have edited other parts of the file as needed.

Unfortunately, the original /modules/mod_jevents_cal/tmpl/default/calendar.php file is still being used. Breakpoints set in the overriding file are never hit. How can I override this file?
cmb set the post as Normal priority — 9 months ago
cmb set the type of the post as  Technical — 9 months ago
9 months ago
·
#231840
0
Votes
Undo
Which theme are you using for the calendar module?

If you are using flat then copy the function you want to change from the default class into your overridden flat class and it should be used from there

JEvents Club members can get priority forum support at the Support Forum. As well as access to a variety of custom JEvents addons and benefits. Join the JEvents club today!

9 months ago
·
#231860
0
Votes
Undo
I've now done that.

The resulting /templates/<template>/html/mod_jevents_cal/flat/calendar.php file (compressed to calendar.zip) is attached. The revised getAvailabilityCalendar() function is near the bottom at line 229.

That function is called from my /templates/<template>/html/com_jevents/flat/year/listevents_body.php override file at line 58. It is also attached here as listevents_body.zip.
  • Page :
  • 1
There are no replies made for this post yet.

Members Area

Show your support

Unlike many Joomla calendars we do not charge to download JEvents - please show your support for this project by becoming a member of the JEvents Club Club members get access to early releases, exclusive member support forums, and Silver and Gold members can use many exciting JEvents addons

Your membership will ensure that JEvents continues to be the best events calendar for Joomla.