How to override calendar/templates/upcoming_mini.mustache ?

How to override calendar/templates/upcoming_mini.mustache ?

by Javier Cuadrado -
Number of replies: 3

Hi,

I'm trying to override calendar/templates/upcoming_mini.mustache in a child theme of boost but I don't get it.

I've duplicated the template in my child theme, but moodle is not taking this into account.

I've tried this:

theme/padplus/tempaltes/core_calendar/upcoming_mini.mustache

&

theme/padplus/tempaltes/calendar/upcoming_mini.mustache

It is probably due to the path.

Thanks in advance !

Javier

Average of ratings: -
In reply to Javier Cuadrado

Re: How to override calendar/templates/upcoming_mini.mustache ?

by Mark Johnson -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

I dont know if it's just a typo in your post, but you've called the folder tempaltes not templates.

In reply to Mark Johnson

Re: How to override calendar/templates/upcoming_mini.mustache ?

by Javier Cuadrado -
Hi Mark,

thanks for your quick answer !

Finally this works theme/padplus/templates/core_calendar/upcoming_mini.mustache
Maybe I had an error in the typo 😅

On the other hand, I'm trying to override the function 

blocks/calendar_upcoming/block_calendar_upcoming.php

Do you know if there is a way to do it directly in my theme like with the template?

In reply to Javier Cuadrado

Re: How to override calendar/templates/upcoming_mini.mustache ?

by Mark Johnson -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

As I explained in your other thread, your theme can override renderers and templates, but not general functions. You've correctly identified that his block uses a template, and you can override that or the core_calendar renderer.

Average of ratings: Useful (1)