We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 45878
    • 2 Posts
    On our site most page content is contained in a Migx setup which lets us choose between several different layouts. Is there any way to get SimpleSearch to show an extract from the Migx content? Im not very familiar with how the Migx setup works as the site was developed by someone else, but in the main template for the pages the Migx bit is [[!getImageList? &tpl=`@FIELD:MIGX_formname` &tvname=`Layout Selector`]] and there are chunks for each layout option, the value I want to use for the extract appears as [[+Column_1_Content]] in these.

    Is this actually possible?
      • 4172
      • 5,888 Posts
      I think, the best option to have the generated MIGX-output searchable, is to render it with a plugin for onDocFormSave into another TV or better into the content-field, if that is unused.

      then its possible to search, extract and highlight the search-result.
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 45878
        • 2 Posts
        The MIGX output already seems to be searchable. Unfortunately there are a few pages that do use the content-field rather than or as well as the MIGX so it would have to be another TV. I don't have much MODX experience yet though so am not sure how to do what you suggest.
          • 4172
          • 5,888 Posts
          as far, as I remember, simpleSearch does (with the default search-driver) only extract from content-field.
          So, if you need an extract of the MIGX-content, the generated MIGX-output would need to be in the content-field or you would need to have a custom-driver, which does optionaly do extracts from TVs.

          maybe its possible to extract directly from the MIGX-items-json-string then.
          Not sure, I haven't tested that.

          With a plugin written for the system-event onDocFormSave it would be possible to read the MIGX-json, render the complete output and save it to the content-field.
          This way the default search-driver could do the extract as usual from content.

            -------------------------------

            you can buy me a beer, if you like MIGX

            http://webcmsolutions.de/migx.html

            Thanks!