Search results based on filenames.
-
Hi.
First, let me thank you for this wonderfull plugin.
When a user doesn’t put something on the title or description field for an attachment, I display the name of the file instead whenever it’s needed.
For those who are interested, here is the piece of code :
<?php echo basename($attachments->url()); ?>Just wrap it in a if statement to check if $attachments->title() is empty or not.
I now would like my users to be able to search for files based on the filename. Is this possible with this plugin or with a slight code modification ?
You can see that by searching for “Lorem”, the Lorem Ipsum 2013 doc is displayed, wich is fine because Lorem is in the title of the file. But I would like this doc to be also displayed when searching for a string in the filename, for example : “2013_06” or “.xslx”.
Many thanks.
- The topic ‘Search results based on filenames.’ is closed to new replies.