Question
Hi, I have enabled search from my WebLeftBar with this command:
<form action='%SCRIPTURLPATH{"search"}%/%WEB%/'>
<input class="twikiInputField" type="text" name="search" size="22" /> <input type="submit" class="twikiSubmit" value="Search" /> - [[WebSearchAdvanced][advanced search]]
</form>
But it searches only the text body but not the topic titles. I figure that the 'search' script searches the text body but not the topic titles. How can I make it search just the topic titles and not the text body ? (If I want to search the body, I would go to 'advanced search')
Environment
--
ChengappaCB - 24 Aug 2008
Answer
If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.
When I have a question on TWiki, this is not the first time that:
- I try to find the ansfer myself, leaving no stone unturned
- Post the question at the Support Page
- I stumble upon the answer ! (This time, I had a look at the code around the 'Search' button on WebHome)
I solved it by replacing the command given abve with:
<form name="pagesearch" action="%SCRIPTURLPATH%/view%SCRIPTSUFFIX%/%WEB%/WebSearch">
<input type="hidden" name="scope" value="topic" />
*Search page names:* <input type="text" name="search" size="22" class="twikiInputField" /> <input type="submit" value="Search" class="twikiSubmit" /> %BR%
[[WebSearchAdvanced][advanced search]]
</form>
This does not modify the search script but achieves the result. Hope this is the right way.
Thanks a lot anyway!
--
ChengappaCB - 25 Aug 2008