10378 Posts in 2194 Topics by 1710 members
| Go to End | Next > | |
| Author | Topic: | 1155 Views |
-
Event Calendar and Search Results

15 April 2010 at 12:00pm
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
-
Re: Event Calendar and Search Results

15 April 2010 at 12:48pm
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?
-
Re: Event Calendar and Search Results

15 April 2010 at 1:30pm
March 4th, 2010
Updated using SVN Checkout.
SVN URL = http://carlinowebdesign.svn.beanstalkapp.com/modules/trunk/
-
Re: Event Calendar and Search Results

15 April 2010 at 1:53pm Last edited: 15 April 2010 1:54pm
Well i'll just give you the example...
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.
-
Re: Event Calendar and Search Results

15 April 2010 at 2:22pm Last edited: 15 April 2010 2:24pm
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.
-
Re: Event Calendar and Search Results

15 April 2010 at 4:53pm
UpcomingEvents($count = 5, $url_segment = null) is decorated into your SiteTree class, so you can use it anywhere. Same for RecentEvents().
-
Re: Event Calendar and Search Results

16 April 2010 at 1:12am Last edited: 16 April 2010 1:49am
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.
| 1155 Views | ||
| Go to Top | Next > |

