|
The Metadata Plugin Metadata Management for Manila |
Site last updated 2/24/2006; 12:33:21 PM |
|
The searchkw() Macro
The Old docs follow: It essentially says, "Give me a list of all the pages on this site where meta name contains meta value." In other words, show me all the pages on this site where Section contains "Sports". Show me all the pages where keyword contains "metadata". Here's the last example for this site, i.e., {metaDataMacros.searchkw("keywords","metadata")}: [Macro error: Internal database error: attempted to read a free block. Try to Save a Copy and relaunch with the new database.] You'll notice that the macro returns its result formatted as an HTML list. Maybe you don't want that. OK. Let's look at the full list of parameters we can use:
So if you want to show only the most recent three items, sorted by postTime, formatted with dashes at the beginning of each line and a note at the beginning and end, you'd say:
OK, let's try it: [Macro error: Internal database error: attempted to read a free block. Try to Save a Copy and relaunch with the new database.] Normally searchkw will list all pages that have keywords meta types containing "metadata", but what if I want it to exclude the page we're on? I just add an extra parameter, the includeSelf parameter:
For an example of a useful application of this macro, see Create an Automatic Site Index with the Metadata Plugin. Note: to reverse the direction of the sorted result list, set the sortDirection parameter to "reverseSort".
|
||||
| This page last updated Tuesday, February 20, 2001 at 1:17:23 PM. | (14089) |