Forum

Thread tagged as: Question

Search - editing the title

Hi there

I am using the in-built search to output results from the Events app. Is there anyway to edit the title as I don't want the date to be in the title, just the text at the start:

https://www.lovebedfordoffers.co.uk.gridhosted.co.uk/search.php?q=offer

e.g. 30% off kids face painting NOT 30% off kids face painting - 28 Feb 2015

Would appreciate any help.

Rich

Rich Hemery

Rich Hemery 0 points

  • 6 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Is the date in your title in the Events app?

Nope. I have the three default fields (Name, Description and Date) but they are separate.

This is what it looks like: https://www.imageupload.co.uk/images/2015/01/21/offer-search.jpg

Drew McLellan

Drew McLellan 2638 points
Perch Support

It looks like the Events app does do that, yes. It's very old and about the least flexible of all the apps.

Why are you building your offers listing on it?

OK, it's not a major issue if there's no workaround, I can go with the excerpt instead of the title.

I am building it in the Events app as it has everything I need, with the main functionality being the offers disapearing automatically when they expire (as the events app already does).

Thanks for your help.

Rich

Drew McLellan

Drew McLellan 2638 points
Perch Support

With a regular content region you'd just use a filter:

perch_content_custom('Offers', [
   'filter' => 'expires',
   'match' => 'gt',
   'value' => date('Y-m-d H:i:s'),
]);