DownloadPHP 7.4PHP 8Joomla 3.10Joomla 4.4Joomla 5
The finder plugin integrates the DPCalendar events into smart search. So the events do get indexed and are available when a visitor uses smart search on your site.
Sometimes it is needed to add extra attributes like the start date to the title or description of a search result. To do that you can make a template override of a file from the folder /plugins/finder/dpcalendar/tmpl by copying it to /templates/{your template}/html/plg_finder_dpcalendar and change it to your needs. In the layout files you can access the different attributes like the start date or images. To get the start date, you can use something like:
DPCalendarHelper::getDate($item->start_date)->format('d.m.Y H:i');
Keep in mind when you change the description, the smart search does some trim operations, so it can be that not everything from the description is shown. You need to be aware of that the items are indexed while saving an event or the index is rebuilt in the back end. This means that the configuration is used of the actual logged in user and not the one which runs the search result. Also when you edit an event in the back end, or the full index is created in the smart search component, then you need to make the template override in the back end template you are using.
Comments (0)