We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4749
    • 623 Posts
    I would like to allow the user to specify a "General site search" or "Search by TV" is this possible?

    For example:
    The forums have a google powered search with an option to choose "modxcms.com" or "web" - I would like something similar. So, if I have a site about widgets I want the user to be able to check "Site Search" or "Widget Search" and widget search would only search tvWidgets. Does that make sense.

    Thanks.
      The MODx has you...
      Utah Web Design
      • 7231
      • 4,205 Posts
      Have you checked the 1.8.x release. I think that I noticed something like this while checking out the demos but I could be mistaken.
        [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

        Something is happening here, but you don't know what it is.
        Do you, Mr. Jones? - [bob dylan]
        • 4749
        • 623 Posts
        Yeah, I haven’t found anything yet. I’ll dig through the 1.8 release thread and see if I can spot something.
          The MODx has you...
          Utah Web Design
          • 7231
          • 4,205 Posts
          Just brainstorming here.

          As of 1.7 AjaxSearch has the same document selecting as Ditto, so you can add the &parents, &level and $documents parameters to focus the search. In the event that you are using a result page (as opposed to ajax) you could set the &parents as a particular container or the site root according to the form option.

          Check out the wiki docs for AjaxSearch for a complete rundown on the options
          http://wiki.modxcms.com/index.php/AjaxSearch
            [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

            Something is happening here, but you don't know what it is.
            Do you, Mr. Jones? - [bob dylan]
            • 4749
            • 623 Posts
            Yeah, I read through that, but the problem is that I need to separate the searches. One for a General search and another for a specific TV Only search. So, if I use the &parents or &documents parameters I’m just including or excluding documents. Or am I totally wrong? I’m looking for a dropdown to choose "general site search" or "widgets only" for the options and then when they choose widgets it will search only those documents that contain widget tvs.
              The MODx has you...
              Utah Web Design
              • 7231
              • 4,205 Posts
              I think that AS will search in TVs but will not filter by TVs (I could be wrong). To filter serach results by TV contents you might consider TV Explorer.

              There is also a chance that AS can do this but it has not been documented yet. In the change log it states that it can now filter out unwanted results (not sure exactly what that means).
                [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

                Something is happening here, but you don't know what it is.
                Do you, Mr. Jones? - [bob dylan]
                • 4749
                • 623 Posts
                I thought about TV Explorer, but it won’t work in this particular case. I would just like it to search the TVs, no need to filter results because all the TVs are different and there will only be one result per search. I’m pretty confident, at least after reading through some of the 1.8 posts, that AS will work. I just need to get my hands dirty.
                  The MODx has you...
                  Utah Web Design