Question
I really like the "Results from Foo Web" header in the "standard" SEARCH results - nice title bar, Foo Web background color, nice separator.
Results from Foo Web:
FormattedSearchResultsFromFooWeb VickiBrown 24 July2006 - 11:56- NEW
I really like the "Results from Foo Web" header...
I can't seem to figure out how to specify this if I use a formatted search. That coolo separator bar with the background color disappears.
There should be a way to specify a formatted search with explicit parameters that duplicates the default results look and feel in all ways.
Is there a way to specify this? If not, I'll file an enhancement request.
Environment
--
VickiBrown - 24 Jul 2006
Answer
If you answer a question - or have a question you asked answered by someone - please remember to edit the page and set the status to answered. The status is in a drop-down list below the edit box.
what does your current search string look like?
--
MatthewCardozo - 25 Jul 2006
I don't have a "current search string". I've been looking at the docs. I don't see options for a "formatted" search string that will provide results identical to the "unformatted" default.
--
VickiBrown - 27 Jul 2006
Sorry, but I am afraid this can not be done easily. I had a look at the code: The formats for both formatted and unformatted searches are pulled from templates - in your distribution,
templates/searchformat.pattern.tmpl templates/search.pattern.tmpl, respectively, if you are using pattern skin. Unfortunately my template skills are not sufficient to understand what's going on and why they define different blocks, so this is where I gave up.... Sorry...
--
HaraldJoerg - 27 Jul 2006
You can use a
FormattedSearch with
header="" and
format="". Here is an example, pulled from the
TagMePlugin code (using table based layout, but a css based layout can be made as well) :
Results from TWiki Web:
| |
$nThis is a short introductory training course for TWiki beginners. %SLIDESHOWSTART% A Taste of TWiki The basic function of TWiki is a Wiki (if that helps!) A Wiki ... |
|
| |
NOTE: This topic is not part of the official TWiki distribution Comments on TWikiPreferences Topic It occurs to me that "Preferences" is one of the things that ... |
|
| |
FAQ: Everybody can edit any page, this is scary. Doesn't that lead to chaos? Answer: TWiki is one of many engines, the first one was built by Ward Cunningham. Collaborating ... |
|
Number of topics: 3
Results from Support Web:
| |
$nQuestion Came across an odd attachment problem .. When I upload a new attachment version via the 'manage' link, with same name as old attachment, the old version is ... |
|
| |
$nQuestion Is it possible to disable editing for certain registered users. The case being where certain users would be allowed to view restricted topics but never allowed ... |
|
| |
$nQuestion I really like the "Results from Foo Web" header in the "standard" SEARCH results nice title bar, Foo Web background color, nice separator. Results from ... |
|
| |
$nQuestion How do you edit Main.TWikiPreferences as indicated as the first bullet under "Next Steps" in the Installation Guide for 4.0, when you haven't gone through ... |
|
| |
$nQuestion One of our service groups would like to offer its documentation on the Twiki. Some of the web pages (FAQ, questions and answers) are to be editable with the ... |
|
| |
$nQuestion Hello, Is there a way to moderate the TWiki registration process? Recently I got into the admin seat on just the webinterface side ... yeah, I am more of ... |
|
| |
$nQuestion EditTablePlugin and SpreadsheetPlugin are working independently. Howerver the following combination is not working for me. Cluster Owner Cumulative ... |
|
| |
$nHi, I am trying to implement Twiki for intranet usage of my company. My Twiki running on Centos server, My configuration: UserInterfaceInternationalisation: Checked ... |
|
Number of topics: 8
You can customize the
header="" and
format="" to fit your needs. If you want to re-use it in several places you could set a preferences variable and use it, such as
format="%MY_SEARCH_FORMAT%".
--
PeterThoeny - 27 Jul 2006
Not quite what I wanted (since it doesn't use the acytual web colors) but a good place to start. Thanks.
--
VickiBrown - 10 Aug 2006
You could contribute a patch that makes colors work in headers (by expanding
$percnt and other tokens in
header="" parameter)
--
PeterThoeny - 10 Aug 2006
uhuh :-)
--
VickiBrown - 14 Aug 2006
could you use:
VAR{"NAME" web="Web"} -- get a preference value from another web
Just happened to read this question and stumbled on that twiki variable. Not sure if it's exactly what you're looking for.
--
MatthewCardozo - 31 Aug 2006
Yes, that is the idea. The code needs to be enhanced so that the SEARCH
header="" expands
$percnt, so that you can write
$percntVAR{\"WEBBGCOLOR\" web=\"$web\"}$percnt in the header.
--
PeterThoeny - 31 Aug 2006
gotcha. could the header be formulated above the search then? It would be nice to have it in the
header="" section, but this might work in the meantime.
--
MatthewCardozo - 31 Aug 2006
I just looked at your example Peter. I get where the header section would be needed now. I hadn't considered having the search check multiple webs. It would be nice to have it differentiate between each web. Doing the header before the search would only work if the search were only checking one web.
--
MatthewCardozo - 31 Aug 2006
OK, I implemented this:
Bugs:Item2836
--
PeterThoeny - 31 Aug 2006