Tags:
create new tag
, view all tags

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

TWiki version: TWikiRelease04x00x04
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS:  
Web server:  
Perl version:  
Client OS:  
Web Browser:  
Categories: Search

-- VickiBrown - 24 Jul 2006

Answer

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

ATasteOfTWiki in TWiki web 2011-08-19 - 05:25 - r62 PeterThoeny
  $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 ...
TWikiPreferencesComments in TWiki web 2008-01-24 - 04:55 - r43 ChengappaCB
  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 ...
WikiCulture in TWiki web 2010-06-19 - 21:29 - r13 PeterThoeny
  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:

AttachmentLinkIsLinkingTolOldVersion in Support web 2009-01-18 - 04:39 - r19 PeterThoeny
  $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 ...
DisableEditingForCertainUsers in Support web 2007-12-16 - 03:09 - r8 PeterThoeny
  $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 ...
FormattedSearchResultsFromFooWeb in Support web 2006-08-31 - 17:45 - r13 PeterThoeny
  $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 ...
GettingFromBasicInstallToNextSteps in Support web 2006-02-13 - 23:39 - r25 PabloCaskey
  $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 ...
HowToInsertStaticPagesUsingScript in Support web 2005-04-06 - 06:28 - r7 PeterThoeny
  $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 ...
ModeratingTWikiRegistration in Support web 2004-11-12 - 16:22 - r4 SamHasler
  $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 ...
NotWorkingEditTableAndSpreadsheet in Support web 2008-12-10 - 01:29 - r11 PeterThoeny
  $nQuestion EditTablePlugin and SpreadsheetPlugin are working independently. Howerver the following combination is not working for me. Cluster Owner Cumulative ...
SID-00664 in Support web 2010-03-04 - 05:10 - r8 PeterThoeny
  $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

 
Topic revision: r13 - 2006-08-31 - PeterThoeny
 
Twitter Delicious Facebook Digg Google Bookmarks E-mail LinkedIn Reddit StumbleUpon    
  • Download TWiki
TWiki logo Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2012 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.