Problems, need help? Have a tip or advice? Post it here.
4 posts Page 1 of 1
I really like CouchCMS and its calendar function. I'm setting up a site with events on every Friday and Saturday and sometimes on Sunday. Right now, I'm using list view with a js function that uses CSS to switch between the calendar grid showing limited info (performer, date, and time) and an agenda view for a month showing much more info (event description, add to calendar link, reservation link). This works fine for a small number of events, but I'm concerned about page speed and length when the calendar gets fuller.

In getting this far, I abandoned page view for individual events, partly because I didn't see how to set up links so site visitors could quickly jump to the previous and next events. Now I'm considering using page view so I can reduce the data in list view, especially including only an excerpt instead of a full description. I'm thinking in particular of usability for mobile users, who might give up on a slow loading page or develop scroll fatigue from an overlong page.

I checked in the forum for linking to previous and next events with no success. I found a few ideas for linking to prev/next blog posts, but I didn't run across anything that seemed to work for events in theory or in practice. I want to skip any dates that have no events, so using dates for prev/next links seems unlikely. I already have events to enter for July 2018, so the post ids will not be in sequence. I didn't see anything from <cms:dump_all /> that seemed likely to help. Any tips on how to handle this?

Did you consider leaving things as is, but adding ajax calls to load less events on first page load and get others later on ajax call?
Thanks for the suggestion. If I understand the idea correctly: Show the excerpt in agenda view with a link that when clicked would pull in the full event description using ajax.

I had not considered ajax, which I have used on only one project so far. For narrow-width devices, I'd want to default to agenda view because 7-cell-wide tables are so tiny and barely legible, especially for my primary audience, which is age 50+. I had thought of using collapsed areas to shorten what appeared on screen, but that approach would still require a large initial load of all data.

More background: These events are for performances by musicians, who might appear once or many times. Rather than cut-and-paste the description for recurring events, I set up a relationship between the events template and the performers template. The event listing uses the contents of that template's fields and then pulls in whatever, if anything, is available in the performers template fields. This way I can reuse the performers description multiple times and instantly update if needed.

Before I pursue this further: Are there any issues using excerpt/excerptHTML tags with related templates? Would I gain anything in page load if the full description from 2 templates was loaded to make the excerpt? Would it be better to have a separate field to provide a short descripton for the agenda view, and then use ajax to pull in the long full description when needed? And are there any issues using ajax with related templates?

Okay, I see this goes to mix up things :)
My experiments with page load speeds show that php code (or, same, couchcms code) usually runs within milliseconds, no matter how complexed is the data-pulling code (from a related template or two related templates or more). It stays so up to several thousand cloned pages (events), so this should not be your concern at all. It means - feel free to set up descriptions and data in backend the way you find it comfortable for admin to manage things.

Now, when CMS serves the page to the browser through the networks - here it matters how big the resulting html page is - 100kb or 2 mb makes a difference for the network (mobile, especially) to deliver data to browser, then browser kicks in to parse the html/css/js and it takes most of the time/speed.

So, first place to optimize: transfer as little as possible - here ajax+json definitely helps.
Second optimization: Initially show as little as possible. It would be wrong to interpret it as 'show only excerpts and let users click every time and wait for loading of full desc'. It would mean to use pagination - load, say, 10 events at a time and if user decides to check up events for next 2 weeks in details - load then the next 10 events (be it ajax-based loading or simply page redirect with pagination provided by couch).

I do not know your design, but believe me, any kind of html that is user-friendly can be coded in such a way to keep it small.
I strongly advise to publish here your target designs and then we can discuss implementation thouroughly. I would say that you do it correctly already with relations.

P.S. 'excerpt' tag merely strips any content enclosed within it. It has no effect on relations or data-pulling. Also it would be still unnoticable, because php runs very fast.
4 posts Page 1 of 1

Who is online

In total there are 3 users online :: 0 registered, 0 hidden and 3 guests
(based on users active over the past 5 minutes)

Users browsing this forum: No registered users and 3 guests