Read the statement by Michael Teeuw here.
MMM-CalendarExt2 - show calendar name in event
-
Hi folks,
I have looked through the MMM-CalendarExt2 config and style documents and haven’t spotted a way to prepend an event with its originating calendar:
So instead of
Math class
Science classI’d like it to show:
Jane: Math class
John: Science classDepending on whether the event came from Jane or John’s google calendar ics.
Thanks!
-
look into the transform function.
https://github.com/MMM-CalendarExt2/MMM-CalendarExt2/blob/master/docs/Filtering-and-Sorting.md
You’ll have to figure out if there’s an event tag you can grab off of, but, here’s the basic concept (I have my system setting CSS classes based on keywords)
transform: function(event) { if (event.title.search("Recycle") > -1) { event.icon = "mdi:recycle"; event.className = "lemay"; } if (event.title.search("Yard Waste") > -1) { event.icon = "entypo-leaf"; event.className = "lemay"; } if (event.title.search("Trash") > -1) { event.icon = "bi:trash"; event.className = "lemay"; } if (event.title.search("Seahawks") > -1) { event.icon = "fa-solid:football-ball"; event.className = "seahawks"; } if (event.title.search("Sounders") > -1) { event.icon = "noto:soccer-ball"; event.className = "sounders"; } return event; }, -
@buggynets where would u get the name from?
-
I would get it from the “name:” that I assigned to that particular calendar in the config document. Right now each row in my display only gives the name of the event from the Google Calendar. I have styled the various calendars to have different colors, but it would be great to also preface that source name for the feed in the event description.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login