"Fossies" - the Fresh Open Source Software Archive

Member "mnogosearch-3.4.1/doc/msearch-cmdref-replacevar.html" (14 Dec 2015, 6368 Bytes) of package /linux/www/mnogosearch-3.4.1.tar.gz:

Caution: In this restricted "Fossies" environment the current HTML page may not be correctly presentated and may have some non-functional links. Alternatively you can here view or download the uninterpreted raw source code. A member file download can also be achieved by clicking within a package contents listing on the according byte size field.



ReplaceVar -- creates or modifies a variable




ReplaceVar {name} {value}

Creates a variable with the given name and value, for further use in the other indexer.conf or search.htm commands.

If the variable has previously been created with another ReplaceVar or ImportEnv command, then its old value is replaced.

The value parameter can reference to other variables previously created by ReplaceVar or ImportEnv commands using $(name) syntax.

Variables created using ReplaceVar are considered to have the character set with the one specified in LocalCharset. When being displayed in search template, variable values are converted to BrowserCharset.

ReplaceVar can also be used to set search query parameters in search.htm, without having to pass them in CGI query string. This example sets sorting order to title, like if the s=s&su=title parameters would have been passed in CGI query string:

ReplaceVar s s
ReplaceVar su title

Note: ReplaceVar has higher precedence over CGI query string parameters. In the above example search.cgi will sort search results strictly in title ascending order, no matter what the user passes in the s and su query string parameters.


ReplaceVar etcdir "/usr/local/mnogosearch/etc/"
Include $(etcdir)/include1.conf
Include $(etcdir)/include2.conf

See also

ImportEnv, Include.