Status: | effective |
Progress: | 100% |
Version: | 1.9.0+ |
Help:Further results
(Redirected from Help:Searchlabel)
The standard option "searchlabel
" of inline queries and the thus generated "further results" link allows to extend displayed results beyond its current stated limit. This help page explains how to further individualize this links appearance.
Styling
Starting with SMW 1.9.0 it is possible to assign individual CSS styling to the pending "further results" link of each result format.
The class will be in a fix form incorporating "smw-" + format name + "-furtherresults"
, e.g. .smw-feed-furtherresults
or .smw-csv-furtherresults
, etc. As demonstrated below, the code is to be added to your "MediaWiki:Common.js" page.
Example 1: "feed" format
This example applies to the result format "feed". It shows how this feature can be used to generate an icon for all feed links. After you have added the following code to "MediaWiki:Common.js", a standard RSS feed icon will appear for all SMW RSS/Atom generated links.
/**
* Additional linked icon for the searchlabel of result format "feed"
*
* @since 1.9.0
*
* @rev 1
* @author mwjames
*/
$( '.smw-feed-furtherresults > a' ).addClass( 'feedlink' );
A working example is available at the main page of this wiki.
Example 2: "CSV" format
As another example for the result format "CSV" you would have to add:
/**
* Additional linked icon for the searchlabel of result format "CSV"
*
* @since 1.9.0
*
* @rev 1
* @author mwjames
*/
$( '.smw-csv-furtherresults > a' );
Other result formats
You may do alike for all the result formats you use which need individual styling.
Related tips
- To change the default message itself (i.e. when no custom message is provided using the "searchlabel" parameter), edit the relevant JSON page in the "MediaWiki:" namespace, e.g.
- "MediaWiki:Smw iq moreresults" (default: "... further results")
- "MediaWiki:Smw-label-feed-link" (default: "RSS")
- "MediaWiki:Smw_csv_link" (default: "CSV")