We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 17412
    • 270 Posts
    hi, If for example I have a site with 2 columns, a side bar and a main content column. I’ll have the main [*content*] and [*longtitle*] published into the content column and in the sidebar I will create a template variable and bind a document to it.

    The document that I bind to the sidebar has content that needs to appear in site searches - however this proves problematic. The modx search engine correctly locates the text appearing in the sidebar BUT provides a link to the document itself and not the document that contains it... and hence my site falls apart.

    Surely by binding a document to a TV which in turn is associated with a certain template - it is quite clear that this document should appear in the context of the template and in the position it is assigned.

    help :!
      • 22815
      • 1,097 Posts
      Quote from: lokust at Sep 06, 2006, 09:10 AM

      Surely by binding a document to a TV which in turn is associated with a certain template - it is quite clear that this document should appear in the context of the template and in the position it is assigned.
      No, it is not at all clear to the search snippet. Your document content could appear on any number of pages, which one should it show? The search function is searching documents, and finds the document.

      So. The solution?

      You have a series of documents that have content that should only be displayed in a sidebar. The search engine links to the content as a document.
      If you write a snippet that redirects the user to the first page it finds in the db to contain that page ID in a particular TV, you can put it in the template of sidebar pages, and everything will work OK.
        No, I don't know what OpenGeek's saying half the time either.
        MODx Documentation: The Wiki | My Wiki contributions | Main MODx Documentation
        Forum: Where to post threads about add-ons | Forum Rules
        Like MODx? donate (and/or share your resources)
        Like me? See my Amazon wishlist
        MODx "Most Promising CMS" - so appropriate!
        • 17412
        • 270 Posts
        okay i’m with you.

        Quote from: PaulGregory at Sep 06, 2006, 10:28 AM

        If you write a snippet that redirects the user to the first page it finds in the db to contain that page ID in a particular TV, you can put it in the template of sidebar pages, and everything will work OK.

        :’( i do not think i would know where to start. i think perhaps i will begin by searching to see if someone else has already created a snippet - seems to me this would be quite a common problem.

        Thanks for your help,

        Al