Options

Search Function Customization

arakneearaknee Registered Users Posts: 22 Big grins
edited December 21, 2013 in SmugMug Customization
Does anyone know if it is possible to customize the search results to only display all the galleries found. Also, can the search be set so that it excludes smart galleries?

Thanks, Rod

Comments

  • Options
    thenickdudethenickdude Registered Users Posts: 1,302 Major grins
    edited December 21, 2013
    Yes, you can have the search begin with the "galleries" view, if you replace the search widget with an HTML block. Use HTML code like so:
    <div class="sm-page-widget-search">
      <form action="/search/" method="get" class="sm-search-form">
        <div>
          <input type="hidden" name="c" value="galleries" />
          <input type="text" name="q" class="sm-form-field sm-form-field-text-input" placeholder="search for galleries..." />
          <button class="sm-button sm-button-size-small sm-button-skin-accent">
            <span class="sm-fonticon sm-button-fonticon sm-fonticon-small sm-fonticon-Search"></span>
            <span class="sm-button-label">Search</span>
          </button>
        </div>
      </form>
    </div>
    

    I think you probably can't exclude smart galleries by changing the search tool. Consider changing the gallery settings for those galleries to disable SmugMug searching, which should exclude them from the search.
  • Options
    ArmadilloArmadillo Registered Users Posts: 31 Big grins
    edited March 26, 2017

    I realize this is an old topic, but I'm looking for something similar. I want to exclude ONE gallery from the site search.
    However I do not want to make that gallery unlisted. I tried turning off Smugmug search for that gallery but it was still searchable via my site search.
    Any idea for some code or obscure setting to hide a normal gallery from site search?

  • Options
    AllenAllen Registered Users Posts: 10,011 Major grins

    Did you check to see if the results were visible when logged out?

    Al - Just a volunteer here having fun
    My Website index | My Blog
  • Options
    ArmadilloArmadillo Registered Users Posts: 31 Big grins

    Yes. With Smugmug searchable disabled for that gallery it's still in the site search results when logged out.
    I do not want to make it unlisted because that changes the URL for that gallery and I already have established links.
    I just want to exclude the gallery from search results.

  • Options
    AllenAllen Registered Users Posts: 10,011 Major grins

    If you turn off "Web and SmugMug Searchable" in the gallery settings and it doesn't, I'd consider it a huge problem for Smugmug.

    Al - Just a volunteer here having fun
    My Website index | My Blog
  • Options
    ArmadilloArmadillo Registered Users Posts: 31 Big grins
    edited March 28, 2017

    It appears the "smugmug search" only effects searches on Smugmug.com itself, not through sites hosted on Smugmug. And the "web search" setting effects search engines.
    So, I guess I'm screwed. I can only unlist that one gallery and unfortunately break every external link to it. :-(

  • Options
    ArmadilloArmadillo Registered Users Posts: 31 Big grins
    edited March 28, 2017

    -deleted-

Sign In or Register to comment.