We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 6561
    • 139 Posts
    I set up a TV for the ’description’ meta value, called ’Se-Description’ and a TV ’Se-Keywords’.

    How do I search content, Description TV and Keywords TV but output the Page Title+Meta Description in the AjaxSearch (non-Ajaxsearch method) result page?
      • 5811
      • 1,717 Posts
      &tvPhx=`tv:displayTV` see this demo page

      ==== &tvPhx : Set placeHolders for TV (template variables)

      0 : disallow the feature
      ’tv:displayTV’ : set up placeholders for each TV (named tvName) linked to the documents found (default)

      Placeholders for TVs are:

      [+as.tvName+], [+as.tvNameShow+], [+as.tvNameClass+]

      Where tvName is the MODx name of a TV

      [+as.tvName+] is the HTML output of your TV
      [+as.tvNameShow+] = 1 if the TV is not NULL
      [+as.tvNameClass+] :
      - ajaxSearch_resultTvName for the non ajax results (&tplResult)
      - AS_ajax_resultTvName for the ajax window (&tplAjaxResult)

      e.g: AS_ajax_resultAsTag1, a tv named "asTag1"
      (take care, the first letter of tvName should be here an upper case)


      displayTV is a provided ajaxSearch function which render the Modx TV output. Don’t change the name!
        • 6561
        • 139 Posts
        Other question: I want to search inside the TV ’Se-Description’. I looked at AjaxSearch Wiki documentation and In the Ajaxsearch snippet call I put parameter &whereseach=’content| tv:Se-Description’. But that throws an error... am I getting the syntax wrong?
          • 6561
          • 139 Posts
          Quote from: Darkelve at Apr 07, 2009, 05:31 AM

          Other question: I want to search inside the TV ’Se-Description’. I looked at AjaxSearch Wiki documentation and In the Ajaxsearch snippet call I put parameter &whereseach=’content| tv:Se-Description’. But that throws an error... am I getting the syntax wrong?



          displayTV is a provided ajaxSearch function which render the Modx TV output. Don’t change the name!
          Oops! That’s probably why I got an error yesterday...
            • 6561
            • 139 Posts
            Do I need to change the values asTag1 and asTag2 values in tvphxResult.tpl.html to the values of my TV’s or what is the method? Or do I put something like &AS_ajax_resultMyTv in Ajaxsearch snippet call?

            Sorry, it’s all still kind of vague to me how this works.


            Quote from: coroico at Apr 06, 2009, 12:31 PM

            &tvPhx=`tv:displayTV` see this demo page

            ==== &tvPhx : Set placeHolders for TV (template variables)

            0 : disallow the feature
            ’tv:displayTV’ : set up placeholders for each TV (named tvName) linked to the documents found (default)

            Placeholders for TVs are:

            [+as.tvName+], [+as.tvNameShow+], [+as.tvNameClass+]

            Where tvName is the MODx name of a TV

            [+as.tvName+] is the HTML output of your TV
            [+as.tvNameShow+] = 1 if the TV is not NULL
            [+as.tvNameClass+] :
            - ajaxSearch_resultTvName for the non ajax results (&tplResult)
            - AS_ajax_resultTvName for the ajax window (&tplAjaxResult)

            e.g: AS_ajax_resultAsTag1, a tv named "asTag1"
            (take care, the first letter of tvName should be here an upper case)


            displayTV is a provided ajaxSearch function which render the Modx TV output. Don’t change the name!
              • 5811
              • 1,717 Posts
              &whereSearch=`content|tv` is enought. This is the value by default. So not required.

              Adds &tvPhx=`tv:displayTV` in your call (landing page) and change your template &tplResult by using the Placeholders:

              [+as.Se-Description+], [+as.Se-DescriptionShow+], [+as.Se-DescriptionClass+]

              and

              [+as.Se-Keywords+], [+as.Se-KeywordsShow+], [+as.Se-KeywordsClass+]
                • 6561
                • 139 Posts
                With your explanations, I am finally able to make head and tail of it. grin