We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 40122
    • 330 Posts
    I need to make some changes to the actual HTML for the SimpleSearch form but I cannot find where this is stored.

    I have checked the snippets that come with the plugin but cant find it.

    Can anyone help me out?

    Thanks!
      • 44195
      • 293 Posts
        I'm lead developer at Digital Penguin Creative Studio in Hong Kong. https://www.digitalpenguin.hk
        Check out the MODX tutorial series on my blog at https://www.hkwebdeveloper.com
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        It is best to make a copy of the default chunk tpl, then use your copy. If there is an update, the default chunk will be overwritten, so any changes you make to that one would be lost.
          Studying MODX in the desert - http://sottwell.com
          Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
          Join the Slack Community - http://modx.org
          • 40122
          • 330 Posts
          Quote from: muzzstick at Jul 06, 2015, 03:36 AM
          Hi, the HTML should be in the chunks rather than the snippets.

          https://github.com/splittingred/SimpleSearch/tree/develop/core/components/simplesearch/elements/chunks

          Thanks but there are no SimpleSearch chunks appearing for me at all
            • 42562
            • 1,145 Posts
            I think mine were non-existent too, and I did not care much to look for them any deeper than where chunks should be, namely in the Element Tree.

            So I created chunks in the format presented on the Extra's tut.
            Hopefully this is what you are looking for.

            The call:
            [[!SimpleSearch?  &ids=`1,374,123,225,22,212`
            &contexts=`web,etc` 
            &exclude=`111,4205,15,34,3137` 
            &containerTpl=`simpleSearchContainerTpl` 
            &tpl=`simpleSearchResultsTpl` 
            &noResultsTpl=`simpleSearchNoResultTpl` 
            &highlightClass=`simplesearch` 
            &highlightTag=`span` 
            &perPage=`100` 
            &searchStyle=`match` 
            &useAllWords=`1`]]

            simpleSearchContainerTpl
            <div id="search">[[+resultInfo]]
            <br>
            Pages(s): [[+paging]]<br>
            <a href="#top">Search again</a>
            <p>[[+results]]</p>
            <br>Pages(s): [[+paging]]
            <br><a href="#top">Search again</a>
            </div>

            simpleSearchResultsTpl
            <h1>[[+idx]]. <a href="[[+link:is=``:then=`[[~[[+id]]]]`:else=`[[+link]]`]]" title="[[+longtitle]]">[[+pagetitle]]</a></h1>
            [[+extract]]<br><br>

            simpleSearchNoResultTpl
            [[+query:is=``:then=``:else=`<div id="search">No results for "[[+query]]". Please try something else, or be more general, or more specific. <br><a href="#top">Search again</a></div>`]]
              TinymceWrapper: Complete back/frontend content solution.
              Harden your MODX site by passwording your three main folders: core, manager, connectors and renaming your assets (thank me later!)
              5 ways to sniff / hack your own sites; even with renamed/hidden folders, burst them all up, to see how secure you are not.
              • 44195
              • 293 Posts
              Ah yeah I see what you mean. I just installed the extra and it's not creating the chunks in the manager on install for me either.
              You can also find them in your modx install at /you-modx-dir/core/components/simplesearch/elements/chunks/

              I posted it as a bug on Github but I can only find splittingred's version. The package installer shows it's maintained by theboxer now.
                I'm lead developer at Digital Penguin Creative Studio in Hong Kong. https://www.digitalpenguin.hk
                Check out the MODX tutorial series on my blog at https://www.hkwebdeveloper.com