Change book | Close bookmaker |
This is a set of widgets to be used in a sidebar navigation. This is used like this:
%INCLUDE{"%SYSTEMWEB%.SolrSideBar"}%
You can also pick individual components using
%INCLUDE{"%SYSTEMWEB%.SolrSideBar" section="solrsimilar"}%Note: all components make use of Foswiki:Extensions/DBCachePlugin for greater flexibility and performance.
%STARTINCLUDE%<noautolink> <div class="solrSideBar"> %INCLUDE{"%WEB%.%TOPIC%" section="solrsimilar"}%<!-- --> %INCLUDE{"%WEB%.%TOPIC%" section="recentchanges"}%<!-- --> </div> </noautolink>%STOPINCLUDE%
%SOLRSIMILAR_LIKE%
preference variable set in your web's WebPreferences
or on the current topic the sidebar is rendered for. See the documentation of %SOLRSIMILAR{}%
part of the SolrPlugin documentation.
%STARTSECTION{"solrsimilar"}%<!-- --> %SOLRSIMILAR{"id:%ENCODE{"%BASEWEB%" old="/" new="."}%.%BASETOPIC%" filter="web:%ENCODE{"%BASEWEB%" old="/" new="."}% type:topic %IF{"defined FILTER" then="%FILTER%"}% -preference_BASETRANSLATION_s:%BASETOPIC% -webtopic:%ENCODE{"%BASEWEB%" old="/" new="."}%.%BASETRANSLATION{default=""}%" like="%SOLRSIMILAR_LIKE{default="field_Category_flat_lst^5,tag"}%" fields="web,topic,title,score,summary" rows="5" header="<h2 >%MAKETEXT{"Similar topics"}%</h2>$n<ul>" footer="</ul>" format="<li> <a href='%SCRIPTURLPATH{"view"}%/$web/$topic' title='%MAKETEXT{"score: [_1]" args="$score"}%'> $percntDBCALL{\"$web.$topic->Applications.RenderTopicThumbnail\" SIZE=\"40x40>\" TYPE=\"plain\" CROP=\"west\" }$percnt <!-- -->$title <div class='foswikiGrayText'>$summary</div> %CLEAR% </a> </li>" separator="$n" }%%ENDSECTION{"solrsimilar"}%
Renders a list of the five most recent changes in the current web.
%STARTSECTION{"recentchanges"}%<!-- --> %SOLRSEARCH{ "web:%ENCODE{"%BASEWEB%" old="/" new="."}% type:topic %IF{"defined FILTER" then="%FILTER%"}% -topic:(WebHome OR WebLinks OR WebSideBar OR WebPreferences OR WebStatistics OR WebTopicList OR WebSearch OR WebIndex OR WebAdvancedSearch OR SitePreferences OR SiteHtmlHead)" sort="date desc" rows="5" fields="web,topic,title,summary" header="<h2 >%MAKETEXT{"Recent Changes"}%</h2>$n<ul>" footer="</ul>" format="<li> <a href='%SCRIPTURLPATH{"view"}%/$web/$topic'> $percntDBCALL{\"$web.$topic->Applications.RenderTopicThumbnail\" SIZE=\"40x40>\" TYPE=\"plain\" CROP=\"west\" }$percnt<!-- -->$title <div class='foswikiGrayText'>$summary</div> %CLEAR% </a> </li>" }%%ENDSECTION{"recentchanges"}%