Open dacar opened 9 years ago
I think it might have something to do with the way I tweaked the backend, e.g. here: https://github.com/titledk/silverstripe-calendar/blob/1.0/templates/Includes/CalendarAdmin_Tools.ss#L12
Probably that would need some tweaking either of those links or figuring out what the translatable module is doing to links.
@anselmdk: Just use Controller::join_links()
to create your links. You can create methods in your CalendarAdmin
like
public function PastEventsLink() {
return self::join_links($this->Link(), 'pastevents');
}
[untested]
and in your template you can call $PastEventsLink
instead of {$Link}pastevents/
.
Controller::join_links() takes care of correctly joining any existing or new URL segments and parameters.
@xini nice, thanks! I'll look at this next time I'll work with the calendar - if no-one sends a pull request before that ;)
There is a problem if you use the translatable module with silverstripe--calendar. The URL segment is in some cases, e.g. on save a page, broken: http://www.pcguth.de/test2014/admin/calendar/?locale=de_DEpastevents/
Can you give advice to fix it?