Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

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.

All other Modules /

Discuss all other Modules here.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Search Results


Go to End


4 Posts   1716 Views

Avatar
webmmsd

Community Member, 10 Posts

10 June 2010 at 6:00am

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!

Attached Files
Avatar
Willr

Forum Moderator, 5523 Posts

10 June 2010 at 6:08pm

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).

Avatar
webmmsd

Community Member, 10 Posts

11 June 2010 at 4:51am

Hello Willr,

This is what I found - $Content.FirstParagraph(html)

I will give what you suggested a try!

Cheers,
Alex

Avatar
webmmsd

Community Member, 10 Posts

11 June 2010 at 5:11am

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

Attached Files