01.12.2012 Views

7 Components: the Function Pages - Developers

7 Components: the Function Pages - Developers

7 Components: the Function Pages - Developers

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Fig. 13.2<br />

Format result<br />

Tab. 13.5<br />

200<br />

��<br />

��<br />

��<br />

Thus, all pages in all webs are displayed that have “Preferences” in<br />

<strong>the</strong>ir title. Special information is excluded, with <strong>the</strong> exception of<br />

categorization into webs. If that, too, is annoying, it can also be suppressed<br />

using noheader="on".<br />

And yet, <strong>the</strong> integration of <strong>the</strong> search into a page can go even far<strong>the</strong>r.<br />

Using formatted searches, you can determine which information<br />

is shown on a page. This can even be taken to <strong>the</strong> point that you<br />

only have certain passages displayed from <strong>the</strong> pages found. This can<br />

be done with <strong>the</strong> parameter format, in which <strong>the</strong> desired display<br />

can be determined. If, for example, you want to display <strong>the</strong> above<br />

list of Preferences pages in a list, just include <strong>the</strong> format parameter:<br />

format="···*·$web: $web.$topic "<br />

The web and <strong>the</strong> link to <strong>the</strong> topic are displayed. Note that <strong>the</strong> header<br />

is now automatically suppressed. This function can be individually<br />

set (see below). As you can see, <strong>the</strong> web and <strong>the</strong> topic title were replaced<br />

by variables that are appropriately filled in by <strong>the</strong> system.<br />

There is a whole list of such variables; we have included a few in<br />

Tab. 13.5.<br />

Variable <strong>Function</strong><br />

$web Name of <strong>the</strong> web in which <strong>the</strong> topic found is located.<br />

$topic Name of <strong>the</strong> topic found. Using <strong>the</strong> formalism<br />

$topic(n, ...), <strong>the</strong> first n characters of<br />

<strong>the</strong> topic title are displayed followed by three<br />

13 Searching in TWiki

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!