Export Seite als DOC | Aktuelle Änderungen - Suchen:


Pagelist Variables

%apply=item id=Enable Page List Protect?%$EnablePageListProtect
When set to 1 (which is the default), causes (:pagelist:) and (:searchresults:) to exclude listing any pages for which the browser does not currently have read authorization. Setting this to zero means that read-protected pages can appear in a listing, but can also speed up searches considerably (because page permissions do not need to be checked).
%apply=item id=Page List Sort Cmp Function?%$PageListSortCmpFunction
The function used to compare values when ordering a page list, for historical reasons the default is 'strcasecmp' and sorts alphabetically and case insensitively. If you regularly order numbers or strings with numbers, you can set this variable to 'strnatcasecmp' and the list will be sorted according to a natural order, case insensitively:
$PageListSortCmpFunction = 'strnatcasecmp';# "natural" sorting of pagelists
Or you can write here the name of a custom function you have defined. This is the general sorting function, for specific needs you can create specific functions, see CustomPagelistSortOrder.
%apply=item id=Page List Var Fold Fn?%$PageListVarFoldFn
Page List? and Search terms, including page variable search terms are always case insensitive for the Latin alphabet. For international characters the page variable terms were case sensitive until Pm Wiki 2.2.115, and became case insensitive from 2.2.116 (like for the Latin characters). If your pagelists relied on the previous behavior, you can set here a function name that does not change the case of the international characters, for example $PageListVarFoldFn = 'strval';
%apply=item id=Search Patterns?%$SearchPatterns
An array of page name patterns to be required or excluded from search and pagelist results. In order to be included in a search listing or page listing, a page's name must not match any pattern that is delimited by exclamation points (!) and must match all other patterns. See Cookbook:SearchPatterns.
# Limit all searches to Main group
$SearchPatterns['default'][] = '/^Main\\./';
# Exclude the Main group from search results
$SearchPatterns['default'][] = '!^Main\\.!';
# Exclude RecentChanges pages from search results
$SearchPatterns['default'][] = '!\\.(All)?RecentChanges$!';
# Prevent a page from listing itself in (:pagelist:) or (:searchresults:)
$SearchPatterns['default'][] = FmtPageName('!^$FullName$!', $pagename);
%apply=item id=Search Box Opt?%$SearchBoxOpt
For example $SearchBoxOpt ['target'] = '$DefaultGroup.Search';
%apply=item id=Search Box Input Type?%$SearchBoxInputType
The HTML "type" attribute for the search field. Default is "text" which is valid HTML 4?. If your skin uses HTML 5?, you can change this to "search":
$SearchBoxInputType = "search";
%apply=item id=Enable Page Index?%$EnablePageIndex
When set to 0, disables default indexing. By default Pm Wiki maintains a "link and word index" in $PageIndexFile which significantly speeds up categories, backlinks, and searches.
%apply=item id=Page Index File?%$PageIndexFile
The location of the "page index" file for (:pagelist:), defaults to $WorkDir/.pageindex.
%apply=item id=Page List Cache Dir?%$PageListCacheDir
The name of a writable directory where Pm Wiki can cache results of (:pagelist:) directives to speed up subsequent displays of the same list. Default is empty, which disables the pagelist cache.
# Enable pagelist caching in work.d/.pagelistcache
$PageListCacheDir = 'work.d/.pagelistcache';
%apply=item id=Page Search Form?%$PageSearchForm
The page to be used to format search results for ?action=search (unless the current page has a "searchresults" directive in it). This variable can be an array, in which case the first page found from the array is used.
# Simple use of page search form in the default group
$PageSearchForm = '$DefaultGroup.Search';
# Use Search page in current group if it exists, otherwise use Site.Search
$PageSearchForm = array('$Group.Search', '[=$[$SiteGroup/Search]=]');
%apply=item id=FPL Template Page Fmt?%$FPLTemplatePageFmt
The pages to be searched for a pagelist template specified by a fmt=#xyz parameter. Defaults to searching the current page, Site.LocalTemplates? and Site.PageListTemplates.
# PMWiki default setup
global $FPLTemplatePageFmt;
$FPLTemplatePageFmt = array(
It can be customized to look in other pages.
# Search a Group.Templates page as well as the Site templates
global $FPLTemplatePageFmt;
$FPLTemplatePageFmt = array(
Or declare defaults for the template array:
# Search a Group.Templates page as well as the Site templates
global $FPLTemplatePageFmt;
SDV($FPLTemplatePageFmt, array('{$FullName}',
    '{$SiteGroup}.LocalTemplates', '{$SiteGroup}.PageListTemplates')
%apply=item id=Enable Undefined Template Vars?%$EnableUndefinedTemplateVars
This variable controls how undefined {$$Variable} is processed in includes and PageList templates. If set to 0 (default), undefined {$$Variable}s are removed from the included section or template. If set to 1, undefined {$$Variable}s are displayed as is, with {$$...}. Note that Pm Wiki versions 2.2.13 and earlier kept unset include/template variables.
$EnableUndefinedTemplateVars = 0; # Delete unset raw template variables
$EnableUndefinedTemplateVars = 1; # Keep and print unset raw template variables
%apply=item id=Page Index Fold Function?%$PageIndexFoldFunction
A custom function used to 'fold' (simplify, normalize) the page words before storing them in the wiki.d/.pageindex file, and the search terms typed by the users. By default, Pm Wiki converts these to lowercase, here you can define a function that does it differently (for example, stripping inline HTML tags).
%apply=item id=Page Index Terms Function?%$PageIndexTermsFunction
A function to split the page texts into normalized search terms. By default, the core function Page Index Terms?() is called, with this variable you can override it with a custom function. This may be useful if you need to remove some texts from the page index, for example inline HTML tags. The first and only argument of the function may be either a string, or an array of strings.
%apply=item id=Enable Search At Least One Term?%$EnableSearchAtLeastOneTerm
By default, searching for several terms like term1 term2 will list pages containing all the terms. Setting this variable to 1 will cause the search to list pages containing at least one of the typed terms. In this case, required terms can be preceded by "+" like +term1 +term2. If you change this variable, you may want to update the search instructions in your Search page.

This page may have a more recent version on pmwiki.org: PmWiki:PagelistVariables, and a talk page: PmWiki:PagelistVariables-Talk.

Bearbeiten - Versionen - Druckansicht - Aktuelle Änderungen - Suchen
Zuletzt geändert am 28.09.2023 10:30 Uhr | Seitenaufrufe: seit 03.10.2013