Forum

Thread tagged as: Question, Addons, Events

Adding event description to event-day.html

Hi,

I'm trying edit event-day.html so that it includes the event description. Both the title and description will be hidden from the user until they click on the relevant day in the calendar. You can see a working example of what I want to achieve here https://www.holbeach.lewisham.sch.uk/. Click on the blue dates to see the full event description.

Previously I have done all the hard work in jQuery but want to move over to the Perch Events Addon.

I've added both eventDescRaw and eventDescHTML to event-day.html, but the first loses the formatting and the second shows the formatting on screen (as in you can see the <p> tags etc).

I'm fairly new to PHP so sorry if I am missing something obvious but is there a way I can pull in the description, including the formating in such a way that it will be formatted by the browser.

Many thanks,

Ian

Ian Buchanan

Ian Buchanan 0 points

  • 7 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

I'm not sure if it's available at that point - what does <perch:showall /> give you?

It shows a table of all the variables and their values. Interestingly the value for eventDescHTML is being formatted correctly.

I've added <perch:showall /> to https://ibuchanan.co.uk/clients/7000/rusheygreen/ (the calendar is at the bottom of the page, light grey dates have events) and also highlighted what is produced when I call eventDescRaw and eventDescHTML.

Thanks

Drew McLellan

Drew McLellan 2638 points
Perch Support

Ok, so you should be able to output it using something like

<perch:events id="eventDescHTML" type="textarea" html="true" />

Hi Drew,

That works, many thanks.

Ian