We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 1766
    • 3 Posts
    Hi there,

    I am using a 0.9.6.3 modx install to manage a website - all is good in my universe, except ::

    I call some content via a snippet which inserts html into the page from another source (php files on my server) which is generated outside of modx. When I search for any of this ’snippet-inserted’ content, I get nothing. The search module only indexes the modx content, not the contents of any snippets.
    These pages are cached though - is there a current plugin/search box that indexes content from the cache, not just from the static content in my individual pages, or can the Ajax search be modified to include this content?

    I am hoping not to have to write something new here :-(

    Desperately hoping for a positive answer...

    Stuart

    PS. I have read the post concerning this - http://modxcms.com/forums/index.php/topic,26526.0.html but there was no solid answer. Has this been developed?
      • 897
      • 1,620 Posts
      Hello,

      Are your snippets calls is cashed? If i correct remember AS can do search not only for modx content tables, but it can seek data in user db tables too. So, know this we can start think about something like this:

      we need to create plugin, that’s handled one of "Cache Service Events" and scan rendered page for real content (skip modx & html/js code), then place this index to special db-page with some add info (docid, time of cache and etc.). That is the all that our plugin must to do (approximately of course). But this will be work only for fully cached page with cached snippets calls.

      Than we need to extended setup of AS for take it to looking of the search terms in our index table together with modx build-in content tables.

      This solution is just a thinking about, this idea need to more discussion.

      Kind regards,
      Aleksey
        "Und wenn du lange in einen Abgrund blickst, blickt der Abgrund auch in dich hinein."

        Не используйте Revo для "просто сайтов". Используйте Evo

        Who can defeat the Russian bear?
        • 897
        • 1,620 Posts
        just come new idea, we don’t need a new table, we can store index or compact text to special TV. may be this is better.

        p.s. and seems AS can’t search in outside tables. I have it with someone confused smiley


        You could also add your own tables where to do a search by defining your own keys.
          "Und wenn du lange in einen Abgrund blickst, blickt der Abgrund auch in dich hinein."

          Не используйте Revo для "просто сайтов". Используйте Evo

          Who can defeat the Russian bear?