Sync Calendar View block with an attachment

Created on 30 August 2024, 5 months ago
Updated 31 August 2024, 5 months ago

Hello,

I have a Calendar View block showing event titles, and also an attachment linked to the block view, showing events in extended way (with images and other additional fields).

I'm trying to filter the attachment according to the month shown in the block, that is, if calendar shows August, in the attachment I want to see only August events. Is this possible?

Thanks in advance for any clue!

💬 Support request
Status

Active

Version

2.1

Component

Documentation

Created by

🇮🇹Italy ggamba Milano

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

Comments & Activities

  • Issue created by @ggamba
  • Could you give more details about the configuration of this view ?

    I guess it is not related to Calendar View directly though - I guess you are trying to share filters between the view and attachment (see this answer on stackoverflow).

  • 🇮🇹Italy ggamba Milano

    Thank you Matthieu,

    yes, I'm trying to share filters between the view and the attachment. I experimented with "Content calendar" from "Calendar View - Demo Views" module: I added an attachment after "Content calendar" page and enabled both "Inherit contextual filters" and "Inherit exposed filters".
    The attachment filters content according to exposed filters in the page, but ignores the month selected in the calendar: I can choose July or June in the page and in the attachment I still have August content.

    I disabled AJAX to see what happens when I navigate between months and I got a parameter like this:

    ?calendar_timestamp=1717192800...

    Then in the attachment I tried to modify the "Authored on" filter as "is greater than 1717192800" but I get (after disabling "Expose this filter") an "Invalid date format" error. If I let the filter exposed, I get an "invalid value" error in browser console.

    If in the filter in the attachment I don't use epoch time but something as "2024-06-01 00:00:00", filtering works. So maybe the problem is that the attachment inherits the month filter from the page, but it is in an unexpected format?

Production build 0.71.5 2024