![]() |
| > Home > Documentation > Latest documentation > more-list |
|
more-listSummary
DescriptionThis output control region is used to define a section of the search results output which is only displayed if there are more matches than specified in the "mv_matchlimit". If there are less matches than the number specified in "mv_matchlimit" then all text/html between the [more-list] and [/more-list] elements will be stripped.
If the optional "next", "prev" and "page" parameters are specified, then they are taken to be image files that will be inserted instead of the standard "Next", "Previous" and page numbers. If "prev" is "none" then no previous link will be output. If "page" is "none" then no links to pages of matches will be output. The images filenames are subject to ImageDir rewrites. Each image will be encased in an <img> tag before being output. If the "border" parameter is specified then it will be passed to the "<img> tags as the "border" parameter. If the "page" is specified, and is not "none", then it will be used as described above and will also be passed a URI argument representing the page number that should be shown. This allows an image generator program to be used to generate page numbers on the fly. If the "border_selected" parameter is specified then it will be passed to the appropriate page number's "<img> tag as the "border" parameter and can therefore be used to mark the "current page". Some examples follow:
Display template
The output of the [more-list] region can be controlled with the sub-tags, listed below, and with the use of the following pre-defined template tokens:
The following shows a simple [search-region], along with a [more-list] display template:
A default template will be used unless a token (or suspected token) is found in the [more-list] region's body text. Interchange will make use of a "{[A-Z][A-Z_]+[A-Z]}" regular expression to check the [more-list] region for template tokens. The default template can be overridden by passing a "more_template" parameter to the enclosing looping tag or, as noted above, by placing template tokens in the [more-list] region. The default template is defined to be backwards-compatible with earlier Interchange versions, as follows:
Sub-tagsThis tag has sub-tags of its own, which can be used to customise the text that will be displayed when multiple pages of output are generated. The sub-tags are as follows: [matches]Outputs the current range of search matches displayed on this page. For instance:
[match-count]Outputs the total number of search matches found, which may be spread over multiple pages. For instance:
[more]Outputs links to additional pages of search matches. For instance:
The "1 2 Next Last", in the previous example, would be output as links to other pages of search results. If mv_more_alpha was set true, in the looping tag's search parameters, then the search results would be grouped by letter instead of by page number. In that case, the [more] list would look something like the following:
The "A" page would contain all results where the key column's value starts with the letter "A". The same for the "B" page etc. If mv_more_alpha_chars was also supplied then the specified first few letters will be matched. The default is 1. For instance, if mv_more_alpha_chars was specified as 2 then the following might result:
[first-anchor]Sets the text that will be returned instead of the default "First", if appropriate.
[next-anchor]Sets the text that will be returned instead of the default "Next", if appropriate.
If the "next_img" parameter is specified as a non-zero value then the [next-anchor] value will be ignored, and the following will be used in its place:
Where $next_img is the value of the "next_img" parameter. If a "border" parameter is specified then a "border="$border"" parameter will be passed to the above HTML "<img>" tag. [prev-anchor]Sets the text that will be returned instead of the default "Previous", if appropriate.
If the "prev_img" parameter is specified as a non-zero value then the [prev-anchor] value will be ignored, and the following will be used in its place:
Where $prev_img is the value of the "prev_img" parameter. If a "border" parameter is specified then a "border="$border"" parameter will be passed to the above HTML "<img>" tag. [last-anchor]Sets the text that will be returned instead of the default "Previous", if appropriate.
[decade-next] and [decade-prev]If have many pages of matches and don't want to have them all displayed at once, in a big list, you can use these sub-tags, as follows:
If these tags are used, but are empty (i.e. "[decade-next][/decade-next]") then the default text will be used. The [decade-next] default text is "[more>>]", and the [decade-prev] default text is "[<<more]". The above example will output text that reads like the following for pages 1 through 10:
Pages 11 through 20 will output text that reads like the following:
Of course, image-based anchors can be used as well. [page-anchor]Sets the HTML that will be output as a link to further pages of search results. For instance:
The above will produce output that reads like the following:
The "$PAGE$" marker will be replaced with the target page number, and the above will produce output that reads like the following: The following markers are replaced within the [page-anchor] text:
[link-template]This sub-tag can be used to customise the HTML hyperlink, and is useful for adding a JavaScript "onclick" attribute, a CSS style or forcing the link target to use a different window, etc. For instance:
The following markers are replaced within the [link-anchor] text:
See also
|
| Home | Legal nonsense | Privacy policy | Contact us |