We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 5811
    • 1,717 Posts
    Implemented with the &tvPhx parameter of the 1.8.0.

    This parameter could work for TVs but also for any joined tables (MODx or Custom).
      • 28033
      • 925 Posts
      I dunno if this is a bug, but let’s say you used ajaxSearch, as the title is in the snippet’s heading.

      Yes, it will show up, but if you add any parameters, the snippet will not output anything (although editing the values directly in the snippet code works).

      I usually take the name/version/description from the snippet’s heading, so users might have an issue if they did what I did.

      Of course, changing ajax to Ajax makes it work as expected.
        My Snippets
        -> PopUpChunk v1.0
        • 4749
        • 623 Posts
        Thanks.
          The MODx has you...
          Utah Web Design
          • 4749
          • 623 Posts
          Quote from: rthrash at Jul 22, 2008, 02:45 PM

          Regarding making the TV values available as a placeholder, that’d be ideal. Would pair nicely with being able to restrict searching to just a specific TV.

          Coroico, this is what I’m talking about. Is this possible? Or will it be in future releases? Or should I try and hack the code?
            The MODx has you...
            Utah Web Design
            • 5811
            • 1,717 Posts
            @Cbaone

            Yes, it works with the version 1.8 with the parameter &tvphx.

            If your search find the correct document with the linked TV "widget_name" :
            - create your own tplResultAjax template (or tplResult for non ajax mode) by copying the default template you use
            - allow the displaying of TV in your snippet call by:
            &tvPhx=`tv:displayTV`


            and use the appropriate placeholder in your new result template:

            [+as.widget_name+], [+as.widget_nameShow+], [+as.widget_nameClass+]


            [+as.widget_nameName+] is the HTML output of your TV
            [+as.widget_nameShow+] = 1 if the TV is not NULL
            [+as.widget_nameClass+] :
            - ajaxSearch_resultWidget_name for the non ajax results (&tplResult)
            - AS_ajax_resultWidget_name for the ajax window (&tplAjaxResult)

            (take care, the first letter of "widget_name" should be here an upper case)

            displayTV is a provided ajaxSearch function which render the Modx TV output. Don’t change the name!

            In your case the main problem is not to display the content of the TV "widget_name" but to filter documents that could contains for instance "cro" in other fields (pagetitle, description, ...).

            Let me few days and I will propose you a hack or may be an evolution for AS.