Contribution: theme with customized logos per category

Re: Contribution: theme with customized logos per category

by Danny Wahl -
Number of replies: 1

Seems like a lot of work to sort out all those categories. Have you looked at how essential and elegance handle custom category icons?

https://github.com/gjb2048/moodle-theme_essential/blob/master/settings.php#L1541-L1556

Create a setting for each category (with name, etc...).  Once you have that then it's a matter calling it in the theme, checking isset() or empty() or something - and outputting or getting the parent.

In reply to Danny Wahl

Re: Contribution: theme with customized logos per category

by Jordi Pujol-Ahulló -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Thanks for your comment.

Have you noticed that this theme generates automatically all logos for the customized categories? We needed to make it as simple and selfmanaged as possible. Therefore, you only need to select which categories would have customized logos.

Another important issue is that any course lying below a customized category (regardless its depth, meanwhile the course is under its subtree), the given customized logo will be used. So, the idea behind this is to use the customized logo from the deepest and closest customized category for any given course (maybe it is not a parent category, but a grant-parent category or so).

What exactly would you do simpler?

Thanks!

Jordi