Populate Feed Block With All Events on Load or use Tokens to populate

Created on 23 February 2024, 4 months ago
Updated 12 March 2024, 4 months ago

Problem/Motivation

Currently when the "Communico Filter Block" is loaded in a page display it is initially blank and requires a filter to be selected before anything renders. Is there any way to have this block render all events and the filter down?

Additionally is there any way to provide content tokens to provide more dynamic lists or populated filters?

For example if I wanted to use a token value from the node to set defaults for the communico plus filters? (Event types, Age Group, Location, etc.)

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

✨ Feature request
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States jgoodwill01

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @jgoodwill01
  • Assigned to earlyburg
  • πŸ‡ΊπŸ‡ΈUnited States earlyburg

    By default this module creates a feed block which will load content when a page load happens.
    This could be a caching issue, but I would like to learn more about this.
    Is the block placed using the Drupal admin interface or instanciated at the template level?

    The block feed is created directly from a request to the Communico API, and there are two ways to view event details -
    1. Access /event/{Communico event Id} to view details of the event from a call to Communico API.
    2. Import events to Drupal as node content here: /admin/config/communico_plus/import.

    Communico Plus defines a node type called "event page", which can store event information in the Drupal database.

    To achieve the functionality that you mention, I suggest importing events as nodes and then using Views to create a block to display the imported event_page data.

    Does clearing the cache in Drupal resolve the event loading issue that you reported?
    Thank you. I appreciate your patience with this issue.

  • πŸ‡ΊπŸ‡ΈUnited States jgoodwill01

    Hi and Thank you,

    I've tried two different ways of attaching the block to my Event Pages.

    1. Using the template manager for the content type. This works in adding the filters but doesn't pre-populate. It technically functions but isn't great for our application.

    2. Using Block layout and assigning to the event page content type, which provides the same functionality as above.

    Note: As I was typing this I found that if I remove the "Family Program" type in the popIfEmpty function the communico filter block will prepopulate for us on page load. Not a caching issue we just didn't have that event type.

    function popIfEmpty() {
    $eventsLimit = '10';
    $current_date = date('Y-m-d');
    $blockStartDate = $current_date;
    $blockEndDate = date('Y-m-d', strtotime($current_date . "+7 days"));
    $eventType = 'Family Program'; Change to $eventType = '';

    I really like importing the events to our site and I'm getting closer to having that be what we need now that we have a way to filter out private events (by modifying the module).

    Providing fields for image import(eventImage and eventImageAltText), registration (registration) status open(registrationOpens) / close(registrationCloses), private(privateEvent),and publishDate into the event page content type would be very useful and give some very excellent integration for Communico in Views.

    Thanks again for your help.

  • πŸ‡ΊπŸ‡ΈUnited States earlyburg

    I'm going to create a bug report to review caching behavior for the Communico Filter Block in D10.
    The behavior that you are seeing is not per the design,
    Thank you for helping debug this and bringing it to my attention.

  • πŸ‡ΊπŸ‡ΈUnited States earlyburg

    Hello,
    This bug has been worked on and the fix is available in the latest release.
    https://www.drupal.org/project/communico_plus/releases/1.0.0-beta11 β†’

    I strongly urge you to read the release notes and the upgrade recomendations.

    Thank you for your patience I appreciate it.

Production build 0.69.0 2024