Jump to:

10929 Posts in 2613 Topics by 1809 members

All other Modules

SilverStripe Forums » All other Modules » Event Calendar and Search Results

Discuss all other Modules here.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1 2
Go to End
Author Topic: 1477 Views
  • churika
    Avatar
    Community Member
    29 Posts

    Event Calendar and Search Results Link to this post

    When events on my event calendar appear in my search results, the $Link that the search results get is the $baseURL + $URLSegment, it doesn't include any of the date range parameters for the $Link, which makes the page all funky when it doesn't have date parameters.

    Is this just a common problem or is there a fix?

    Using SilverStripe 2.3.6

  • UncleCheese
    Avatar
    4085 Posts

    Re: Event Calendar and Search Results Link to this post

    That doesn't seem right. It should default to the most nearest date if none is passed to it. When was the last time you updated EventCalendar?

  • churika
    Avatar
    Community Member
    29 Posts

    Re: Event Calendar and Search Results Link to this post

    March 4th, 2010

    Updated using SVN Checkout.

    SVN URL = http://carlinowebdesign.svn.beanstalkapp.com/modules/trunk/

  • UncleCheese
    Avatar
    4085 Posts

    Re: Event Calendar and Search Results Link to this post

    What do you mean by "all funky?"

  • churika
    Avatar
    Community Member
    29 Posts

    Re: Event Calendar and Search Results Link to this post

    Well i'll just give you the example...

    http://new.pjcbg.org

    Search "plant" and hit enter.

    Click the first result.

    To view that same exact page not all funky...go to Education -> Lecture Series from the nav and choose the 3rd event.

  • churika
    Avatar
    Community Member
    29 Posts

    Re: Event Calendar and Search Results Link to this post

    Also while I've got you UncleCheese, how would I create a function as a control for pulling the top 2 results of for Upcoming Events? I know how to do that in a SQL Query but i'm unfamiliar with SilverStripe as a whole so far.

    function UpcomingEvents() {
       $articles = DataObject::get("Page", "`ClassName` IN ('CalendarEvent')");
       $articles->sort("Date", "DESC");
       $returnarticles = $articles->getRange(0, 2);
       
       return $returnarticles;
    }

    Something like that? But I don't see that pulling specific dates.

  • UncleCheese
    Avatar
    4085 Posts

    Re: Event Calendar and Search Results Link to this post

    UpcomingEvents($count = 5, $url_segment = null) is decorated into your SiteTree class, so you can use it anywhere. Same for RecentEvents().

  • churika
    Avatar
    Community Member
    29 Posts

    Re: Event Calendar and Search Results Link to this post

    No idea on why the search results are doing that? Should I update the core+modules or?

    Seems also the control for <% control UpcomingEvents %> is also bringing in a broken $Link the same as search results and it doesn't seem to be ordering them according to date, and bringing in past events.

    1477 Views
Page: 1 2
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.