Hello, is there a way that I can have images NOT show up in the search results? I want text only on the search results page.
Thank You!
This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.
Please use forum.silverstripe.org for any new questions
(announcement).
The forum archive will stick around, but will be read only.
You can also use our Slack channel
or StackOverflow to ask for help.
Check out our community overview for more options to contribute.
Hello, is there a way that I can have images NOT show up in the search results? I want text only on the search results page.
Thank You!
In your search results template instead of $Content.Summary or whatever you use I believe you can do $Content.NoHTML which strips all html tags out of the text (including images).
Hello Willr,
This is what I found - $Content.FirstParagraph(html)
I will give what you suggested a try!
Cheers,
Alex
YES!!!!!! Made this modification in Page_results.ss in the layout folder buried in the themes folder
Changed this - $Content.FirstParagraph(html)
to - $Content.NoHTML - which stripped the images, but it had lots of text (still very acceptable)
next try - $Content.FirstParagraph(NoHTML) - NICE
NoHTML - is this case sensitive? Guess I could do a version all lower case and find out, duh.
THANK YOU!
Alex