Skip to content
General Revolution Evolution Add-ons International
Login | Register | MODX.com
MODX Open Source Content Management System, Framework, Platform and More.
Find a Partner | Hosts + SaaS | Jobs | Donate
  • RegisterSign Up with the MODX Community
  • LoginUse Your MODX.com Account
  • MODX Community Forums
  • Add-ons
  • Search
  •  
  • SimpleSearch: How to style when no search results are returned?#

  • 18463
    121

    Martijn van Turnhout Reply #1, 1 year ago

    Reply
    • Link to this post#1
    First time I'm actually using SimpleSearch in a website.

    So far, I'm impressed. Very customisable. However, I've stumbled upon a problem.

    It's when you don't use a value when submitting the search form. The message "There were no search results. Please try using more general terms to get more results." appears, but without any tags surrounding it! No paragraph or span tags whatsoever. How can I modify the appearance of this message?


  • 30319
    374

    TomMLS Reply #2, 1 year ago

    Reply
    • Link to this post#2
    The phrase is probably in the lexicon. Add your desired tags to the lexicon phrase.
    Alternately figure out where in the code this phrase is called and modify the code to insert your desired tags.
    HTH Tom


  • 18463
    121

    Martijn van Turnhout Reply #3, 1 year ago

    Reply
    • Link to this post#3
    Yeah, I've already modified the lexicon. I consider that a bit of a hack though. I've already submitted this as a bug through GitHub. A message like this should be modified through a TPL.


  • 37693
    19

    shaunmorrison Reply #4, 6 months, 1 week ago

    Reply
    • Link to this post#4
    Hi

    This has been resolved: https://github.com/splittingred/SimpleSearch/issues/46

    Can be used called like this:

    [[!SimpleSearch? &noResultsTpl=`yourtemplatename`]]
    

    NOTE:

    You can use in your template to display the search query - e.g.
    No results for "[[+query]]". Please try something else.

    Many thanks,
    Shaun


  • 22835
    28

    pauloneill79 Reply #5, 1 week ago

    Reply
    • Link to this post#5
    This a very useful and important post.

    Can this content be added to the rtfm page, please!





Actions

Login to Post

Other Support Options

To file a bug or make a feature request visit our issue tracker, or you can also purchase commercial support.

Love MODX?

If you build sites for a living with MODX or just love using it, why not give back?

Information

Posted in this thread:
Martijn van Turnhout, TomMLS, pauloneill79, shaunmorrison

 
Back to Top

MODX Global HQ

1333 N Stemmons Fwy, Ste 110
Dallas, TX 75207
United States

+1 (469) 777-MODX (6639)

The MODX Company

  • Contact
  • Media Center
  • Careers at MODX
  • Wall of Fame
  • The MODX Blog

Sponsors

SoftLayer Firehost: Secure Cloud Hosting

Stay Connected

Read our previous email newsletters.

Twitter Facebook Google+ LinkedIn github Feeds

Privacy Policy | Terms of Service | Pixels by AKTA Web Studio© 2005-2012 MODX. All rights reserved. Trademark Policy