Question
I am developing a customised advanced search page for our TWiki web. I have different categories of pages, and multiple possible topics in which I would like to display the search results. For example, I have an overall results topic in which search results are displayed in multiple columns for the different categories, and individual results topics for each category without the multi-column layout.
Each result page contains one or more embbeded
%SEARCH%
s that extract search term and parameters from
%URLPARAMS%
.
What would be the best way to allow the selection of a different output page, dependent on the form parameters?
I have tried the following to no avail:
- Conditional setting of customised content variables dependent on url parameters which could be received and displayed in template files- until I realised that was impossible.
-
JavaScript to create multiple submits with different actions assoicated with the onClicks.
All pointers appreciated.
Jon
Environment
--
JonathanManning - 21 May 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.
I don't completely understand what you are trying to achieve. One search result page where topics of different categories are combined?
--
ArthurClemens - 21 May 2008
Thanks for the reply. No, I already have that really- I have a results page that runs 3 searches over 3 different category types from the same set of url parameters passed from a search page. The result are assigned to separate content variables, and displayed in separate columns of the results page by use of a template.
If the user selects a singe topic type, however, I would like to provide more information, and would use a different topic to display the results with a different embedded formatted search.
Bottom line: is it possible to conditionally use different topics as actions from a submitted form, dependent on the content of that form?
--
JonathanManning - 21 May 2008
Okay, the
JavaScript-type solution mentioned here:
http://www.web-source.net/web_development/form_action.htm
does in fact seem to work. Thanks!
Jon
--
JonathanManning - 21 May 2008