Jump to:

10848 Posts in 2516 Topics by 1792 members

All other Modules

SilverStripe Forums » All other Modules » Search Results

Discuss all other Modules here.

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

Page: 1
Go to End
Author Topic: 950 Views
  • webmmsd
    Avatar
    Community Member
    10 Posts

    Search Results Link to this post

    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
  • Willr
    Avatar
    Forum Moderator
    5462 Posts

    Re: Search Results Link to this post

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

  • webmmsd
    Avatar
    Community Member
    10 Posts

    Re: Search Results Link to this post

    Hello Willr,

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

    I will give what you suggested a try!

    Cheers,
    Alex

  • webmmsd
    Avatar
    Community Member
    10 Posts

    Re: Search Results Link to this post

    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
    950 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.