Hello list, Happy New Year! Sorry if I already posted this msg, but I didn't see it so I think that was another malfunctioning of my mailer. I gave a ZCatalog and I perform searches on the PrincipiaSearchSource field. I modified the results table so that it shows links to the found occurrences, not just blackon white results Now what I'd like that when I click on one of those links, the file that opens has the occurrences highlighted somehow, say: blah bla blah occurrence blah bla blah Anyone would suggest me how? Thak you so much Bye Catonano __________________________________________________________________ Tiscali ADSL: abbonati entro il 31 gennaio. Non paghi l'attivazione. Non paghi il primo mese. http://www.tiscali.it/adsl
You'll probably want to pass the search terms on by putting them into a hidden form variable or attaching them to the links you're building on your results, like so: http://yoursite.com/objectfound?yoursearchterms=<dtml-var yoursearchterms> And you'll need some sort of document filter method to process your document and do a string match against your search terms--maybe a Python script that takes your document source and your search terms (as a list) as arguments and does something like this: for term in searchterms: document_source.replace(term, "<b>"+term+"</b> return document_source So your link will actually look like this: http://yoursite.com/objectfound/pythonobjectprocessor?yoursearchterms=<dtml- var yoursearchterms> On 1/3/03 4:11 PM, "catonano@tiscali.it" <catonano@tiscali.it> wrote:
Hello list, Happy New Year!
Sorry if I already posted this msg, but I didn't see it so I think that was another malfunctioning of my mailer.
I gave a ZCatalog and I perform searches on the PrincipiaSearchSource field. I modified the results table so that it shows links to the found occurrences, not just blackon white results
Now what I'd like that when I click on one of those links, the file that opens has the occurrences highlighted somehow, say:
blah bla blah occurrence blah bla blah
Anyone would suggest me how? Thak you so much Bye Catonano
__________________________________________________________________ Tiscali ADSL: abbonati entro il 31 gennaio. Non paghi l'attivazione. Non paghi il primo mese. http://www.tiscali.it/adsl
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Chris, thanks so much! I just did it like you suggested to do and it works ! Thanks! The only thing is that the replace(searchTerm, replacedString) method is case sensitive. I mean that 'LONGSTRING'.replace('long', 'simlpe') fails, leaving LONGSTRING untouched. At now, I converted evrything with 'LONGSTRING'.replace('long'.upper(), 'simple.upper()') and that works but I don't like it so much since it requires all my longstrings to be uppercase, wich they are, but it's just an incident. The day I run into a lowercase longstring I don't know how to handle it. Can I make it case insensitive? I didn't find it in the Zope help Thank you so much anyhow ;-) Bye Catonano On Fri, 03 Jan 2003 16:31:45 -0500, Chris Muldrow wrote:
You'll probably want to pass the search terms on by putting them into a hidden form variable or attaching them to the links you're building on your results, like so: http://yoursite.com/objectfound?yoursearchterms=<dtml-var yoursearchterms> And you'll need some sort of document filter method to process your document and do a string match against your search terms--maybe a Python script that takes your document source and your search terms (as a list) as arguments and does something like this:
for term in searchterms: document_source.replace(term, "<b>"+term+"</b> return document_source
So your link will actually look like this: http://yoursite.com/objectfound/pythonobjectprocessor?yoursearchterms=<dtml- var yoursearchterms>
On 1/3/03 4:11 PM, "catonano@tiscali.it" <catonano@tiscali.it> wrote:
Hello list, Happy New Year!
Sorry if I already posted this msg, but I didn't see it so I think that was another malfunctioning of my mailer
catonano@tiscali.it wrote:
Hello list, Happy New Year!
Sorry if I already posted this msg, but I didn't see it so I think that was another malfunctioning of my mailer.
I gave a ZCatalog and I perform searches on the PrincipiaSearchSource field. I modified the results table so that it shows links to the found occurrences, not just blackon white results
Now what I'd like that when I click on one of those links, the file that opens has the occurrences highlighted somehow, say:
blah bla blah occurrence blah bla blah
Anyone would suggest me how? Thak you so much Bye Catonano
Maybe you can learn from this product? http://www.zope.org/Members/Ioan/SiteSearch I have not used it myself, but feel free to ask if you have any problems. \Oliver
participants (4)
-
Catonano -
catonano@tiscali.it -
Chris Muldrow -
Oliver Marx