Results 1 to 19 of 19

Thread: Link from Event (in events list) to Event Detail page

  1. #1
    User
    Join Date
    09-15-19.
    Posts
    39

    Default Link from Event (in events list) to Event Detail page

    Hello everybody! I have never used Contao before and need your help please.
    I need to set up category filters for events.

    I found and installed Contao Official Demo Template and [mae_event_categories] extension for tests.
    I’ve created categories and attached each event to at least one category.
    On Events page on top I have Events Filter (by categories) and under the filter the Events List.

    The problem is that clicking on event title or “Read More” I get redirected to the Home Page instead of Event Details.
    In Event settings -> Redirect Target I have set “Use Default” – the same as in News settings, where clicking on news title I get redirected correctly, to the news details.
    If I set Redirect Target-> Article -> Event Detail the events in the list don’t have links in title and no “Read More”, so it is impossible to get the Event Details page.
    How is possible to fix this issue?
    Last edited by amida; 09/17/2019 at 16:22.

  2. #2
    Community-Moderator xchs's Avatar
    Join Date
    06-19-09.
    Posts
    1,261

    Default

    Did you set a "Redirect page" in the calendar settings?
    Did you add an event reader front end module on the redirect page (event details page)?
    Contao Community Moderator
    → Support options

  3. #3
    User
    Join Date
    09-15-19.
    Posts
    39

    Default

    Did you set a "Redirect page" in the calendar settings?
    Sorry, I don't understand what means to set a redirect page in calendar settings. I ca not find anywhere calendar settings.

    Did you add an event reader front end module on the redirect page (event details page)?
    Yes, I created an event detail page

    sit-structure.JPG

    articles.JPG

    article.JPG

    events-list.JPG

    Clicking on one even I get:

    event-details.JPG
    Last edited by amida; 09/22/2019 at 16:28.

  4. #4
    User
    Join Date
    09-15-19.
    Posts
    39

    Default

    I think, I found what you mean

    In Events List settings I should select Event Reader Module - Event Detaiils

    event-reader-module.JPG

    Now I see the event details page!

    The only issue I see is with the categories filter. On the details page it doesn't keep the active category.

    event-1_LI.jpg

    event-1-details.JPG
    Last edited by amida; 09/22/2019 at 16:53.

  5. #5
    User
    Join Date
    09-15-19.
    Posts
    39

    Default

    I just realized, I don't need the category filter on event details page at all.
    This module was installed just for events list page. Is it possible to hide it on details page?

  6. #6
    Community-Moderator xchs's Avatar
    Join Date
    06-19-09.
    Posts
    1,261

    Default

    I don't know the extension in detail, but basically you can hide everything via display: none;
    Contao Community Moderator
    → Support options

  7. #7
    User
    Join Date
    09-15-19.
    Posts
    39

    Default

    I what to hide it by display: "none" just on Event Details page.
    In order to hide it is needed an ID or a Class for example on <body> or on another element before mod_mae_event_filter.
    The Contao script generates the pages with exactly the same classes ad IDs.

    For Events List page:

    events-list-elements.JPG

    For Even Details page:

    event-elements.JPG

    How can I select the for mod_mae_event_filter display:non on details page?
    I tried to add an additional class to Details page in back end but I save it and it does not appear in the page code!!

    ONE-EVENT.JPG
    Last edited by amida; 09/23/2019 at 12:27.

  8. #8
    Community-Moderator xchs's Avatar
    Join Date
    06-19-09.
    Posts
    1,261

    Default

    Quote Originally Posted by amida View Post
    I tried to add an additional class to Details page in back end but I save it and it does not appear in the page code
    But it should! The CSS class should appear among all other classes in your <body> element. Could this eventually be a cache problem?
    Contao Community Moderator
    → Support options

  9. #9
    User
    Join Date
    09-15-19.
    Posts
    39

    Default

    No, it is not cache problem. The cache is OFF.
    I have reloaded the page with CTRL+F5, and when I add such a class for event-reader block, it appears without any cache cleanings..

  10. #10
    Community-Moderator xchs's Avatar
    Join Date
    06-19-09.
    Posts
    1,261

    Default

    If you are unsure about this you can always switch over to the Contao online demo and test it there. And you will see that it works there like a charm.
    Contao Community Moderator
    → Support options

  11. #11
    User
    Join Date
    09-15-19.
    Posts
    39

    Default

    I am working on Contao 3.5.40. The theme is created from zero, just empty pages and I have just one layout.
    Everything works except adding class to THIS page.
    I don't understand why it doesn't publish the new class..

    When I add additional class on another project based on Contao 4..8 + Contao Official Demo theme + mod_mae_event_filter, it appears in <body> element.

    Now I do training on my local computer but later we have to propose our solution to the client and I don't know what will happen on they theme. So, I want to be sure that it will work on they website.
    They have Contao 3.5.38 and they own theme.

  12. #12
    User
    Join Date
    09-15-19.
    Posts
    39

    Default

    When I add additional class on another project based on Contao 4..8 + Contao Official Demo theme + mod_mae_event_filter, it appears in <body> element.
    But here is NOT necessary to hide the filter. It is hidden on details page by default.
    Last edited by amida; 09/23/2019 at 13:55.

  13. #13
    Community-Moderator xchs's Avatar
    Join Date
    06-19-09.
    Posts
    1,261

    Default

    Did you modify the page template fe_*.html5 (do you have such a template in your templates/ folder)?

    The CSS class gets added here: https://github.com/contao/core/blob/...page.html5#L29
    Last edited by xchs; 09/23/2019 at 14:15.
    Contao Community Moderator
    → Support options

  14. #14
    User
    Join Date
    09-15-19.
    Posts
    39

    Default

    Did you modify the page template fe_*.html5
    No

    (do you have such a template in your templates/ folder)?
    Yes, it is called fe_page.html5

    not in templates/ but in /system/modules/core/templates/frontend/

    and it has this line:

    Code:
    <body id="top" class="{{ua::class}}<?php if ($this->class) echo ' ' . $this->class; ?>"<?php if ($this->onload): ?> onload="<?= $this->onload ?>"<?php endif; ?>>
    Last edited by amida; 09/23/2019 at 14:59.

  15. #15
    Community-Moderator xchs's Avatar
    Join Date
    06-19-09.
    Posts
    1,261

    Default

    Okay, no idea then. Anyway, it's not a general problem, because it works fine in the Contao Online Demo. The reason must be somewhere within your installation.
    Contao Community Moderator
    → Support options

  16. #16
    Community-Moderator xchs's Avatar
    Join Date
    06-19-09.
    Posts
    1,261

    Default

    Well, now I've probably understood what the problem is. The event reader displays the event details on the same page as the event list. However, on your event details page, you can add an event reader front end module and let Contao show the event details on that subpage.
    Contao Community Moderator
    → Support options

  17. #17
    User
    Join Date
    09-15-19.
    Posts
    39

    Default

    Well, now I've probably understood what the problem is. The event reader displays the event details on the same page as the event list.
    You are right. I deleted from Site Structure the Event Details page totally and when I click on one event in the list, the Details page opens anyway!
    If I add a new class to the Events List page, it show up in <body> element of both, List Page and Event Details pages.
    I am totally confused. The details page opens without creating this page.
    I was adding the class to a details page which was not used by script!


    However, on your event details page, you can add an event reader front end module and let Contao show the event details on that subpage.
    Ok, understand that I should create again a separate page for Event Details and put on it an event reader module.
    But how to make then to open the Event Details on this additional page?

    I think that it opens on same page because I have set up in Themes > MyTheme > Event List Module > Event reader module the option "Event Details"

    event-reader-module.JPG

    Now I must switch this option OFF and need something else to redirect to Details Page...?

  18. #18
    Community-Moderator xchs's Avatar
    Join Date
    06-19-09.
    Posts
    1,261

    Default

    Quote Originally Posted by amida View Post
    Now I must switch this option OFF and need something else to redirect to Details Page...?
    Please check that you've set your event details page in the calendar settings.
    Contao Community Moderator
    → Support options

  19. #19
    User
    Join Date
    09-15-19.
    Posts
    39

    Ah, finally I found what you call "Calendar Settings" in Events > Settings and here is Redirect page settings.

    redirect1.JPG

    redirect2.JPG

    Now I don't need at all hiding by CSS. The filter on details page is already hidden.
    Thank you very much!!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •