Tuesday, July 30, 2019

Meeting Visualizer Troubles (can you hear me NOW)

Background: Government is filled with meetings, we have meetings to talk about upcoming meetings and meetings we just had sometimes we even have meetings to discuss how to avoid other meetings. So I knew that one of my content types was going to have to be "Meeting" or in my case I was going to call it "Event" so it sounded more generic.

In my world a "Event" has certain "must-have" elements...

  • Title [Textbox, also becomes Content Item Name]
  • Description [Multi-line plain Textbox]
  • Begin Date/Time [Date/Time]
  • Is it all day? [Radio button yes/no]
Then it has additional optional information...
  • End Date/Time [Date/Time]
  • Physical Locations (zero or more reference objects of type PhysicalLocation described below)
    • Required elements
      • Address Title [Textbox, also becomes Content Item Name]
      • Street Address1 [Single Line TextBox]
      • City [Single Line TextBox]
      • State [Single Line TextBox]
      • Zip Code [Single Line TextBox]
    • Optional Elements
      • Street Address2 [Single Line TextBox]
      • Rollup Image [Asset]
  • Virtual Location Information [Multi-line plain textbox]
  • More Information Type (this determines where the title links to in the "list" visualizer)
    • Event Details [HTML]
    • Webpage [URL]
    • Document [Asset]
    • None
  • Agenda [Asset]
  • Minutes [Asset]
  • Event Documents [Asset(s)]
This seems like a good starting place and I'll be adding onto it as I go. Now onto my issue.

Issue: Often times there are multiple committees and/or subcommittees as well as we need to display these in a way that my users are accustomed to I need to be able to seperate the "Upcoming" meetings from the "Previous" meetings.

Solution(s):

For the "committee" and "subcommittee" portion I'm going to leverage the "tag" portion on the content item.  Users should be able to start entering the committee and subcommittee name into the tag box and after the first entry of a given committee it will auto-prompt them.  Now this is a little prone to user error, but it gives great flexibility for the names to be added to and deleted over time. The I can just throw visualizers on the page and use the default "filter" to limit which committee is show on a given page.  This should accomplish the need to separate out committee schedules in a way that's fairly easy for the users to manage and me to control.

That was the easy part, the other part is much more complex since the visualizer ONLY allows you to filter by "TAG". Even the advanced URL filtering has trouble doing logical assessments and is more adapt at doing things like "beginswith" or "endswith" type evaluation.  Here I need a "time" evaluation to limit what is showed.

Having nothing at hand I had to get creative and the answer was in creating TWO visualizers, one for "future" events and one for "previous" events. This wasn't ideal but it would work if i could get the visualizer itself to determine which results to show vs not show.  The problem was NOTHING in the documentation for date filters showed a way to compare a datefield to "NOW" or "TODAY". It existed in the Shopify version of liquid but not in the EVOQ version. So after MUCH searching and trial and error I found a couple crumbs that when combined showed me an UNDOCUMENTED ENUM.

By using the code below I'm able to get the current date/time in a formatted manner and assign it to a variable that I CAN then use in an IF statement.
{% assign xNow = 'now' | date: "MM/dd/yyyy" %}
You can add hh:mm:ss to formatting filter to get the time as well, but in my situation I only needed the date.

So now my if statement looks like this to get me my "Upcoming" events.
{% assign xNow = 'now' | date: "MM/dd/yyyy" %}
{% assign xbeginDate = beginDateTime | date: "MM/dd/yyyy" %}
{% if xbeginDate >= xNow %}
...
...
..
{% endif %}
And I'll be darn it works!  Hopefully this saves you some time looking through tones of other sites.

Saving my users through Structured Content

When I first started with EVOQ for my main workplace I decided that I would utalize the Structured Content engine heavily.  Now anyone familiar with DotNetNuke knows that there are a ton of options available for "liquid content" type template development to make life easier on users.  What you may not know if you haven't looked at EVOQ is that it's one of the main features of the commercial product.

For my users both keeping the website consistent and accessible has been a major chore, Occasionally, I get an extremely smart user who can do one of those two, but never both.   Now in the world of enterprise you strive to be both, but in the world of government it's an essential.  Lawsuits get brought and horrible press is written about sloppy websites or websites that ostracize a portion of the population like the blind or the physically limited. This is why I see Structured Content as a super important tool in the fight against user errors, it allows the users to essentially fill out a form with their data and then for me to control how that data is displayed.

Now many people will say the main benefit to this type of system is that you're creating a "Headless CMS" so you can redistribute the content through a myriad of interfaces like Alexa or Facebook messenger or name a end-point.  While this may seem like a great idea and your management may see all the great possibilities for this, the truth is you probably have enough trouble managing your development load already and real people don't want the "same" message in multiple platforms.  Think of it this way, just because you can get pizza delivered by car, boat, plane, bicycle, rickshaw, drone and para-glider does it mean that you want the EXACT same pizza delivered at the EXACT same time by ALL those methods? The answer is no, and if someone says "well most people only subscribe to us on one platform, not all of them", while that could be true for some it's probably not true for MOST.  If you like a brand you probably follow them on Twitter, Facebook, Instagram and check out their site from time to time.

So I'm looking at the Structured Content engine for having the control, not the capabilities.  That however, is not to say that I don't need capabilities in that control and there is the rub.  I need to be able to have all the control and commands I would with this flexible data as if i was writing an application to display it. More on that to come...

So what do you think? Do you have problems like this with users? How do you keep them from ruining the site? Does this sound like a path you would or will take?