Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

Problem with event filtering #8797

Open
Peter1001 opened this issue Oct 10, 2017 · 1 comment
Open

Problem with event filtering #8797

Peter1001 opened this issue Oct 10, 2017 · 1 comment
Labels

Comments

@Peter1001
Copy link

Peter1001 commented Oct 10, 2017

I want to show events depending on the URL settings in the following ways:

  • .../index.php/events.html should show all events of all years
  • .../index.php/events.html?month=201710 should show all events of October 2017 (similar for year and day specification)

In the Event list module I can specify different settings for the Event list format with the following effects:

  • Month
    • All events of the current month (no date specification)
    • All events of the specified range (with date specification)
  • Year
    • same as for Month
  • All Events
    • All events (no filtering) regardless of date specification or not
  • All upcoming events
    • All upcomning events (no filtering) regardless of date specification or not
  • plus 2 years
    • All upcomning events of the next 2 years (no filtering) regardless of date specification or not

How do I achieve that filtering is applied (if date is specified) but on the other hand getting the full list of events (no date specification) or all upcoming or next 2 year or ...

Probably there is better solution to solve this.

The problem is reproducible in the Official Contao Demo 3.5.0 running on Contao core 3.5.30.

Peter

@KaiserCh
Copy link

If it's stupid but works...
You could create 2 list modules, each with a custom template. The first shows the full list, the second a month-based list. Now create a separate .html5-file in the template folder, that contains some small php logic: if URL-parameter "month" is not set, show an insert-tag for module 1, otherwise for module 2. Include this .html5-file via {{file::*}} insert tag where you need it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants