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 :!
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.