addedValueMacros.queryRedoLink
Syntax
{addedValueMacros.queryRedo(whatText, customKey="", queryID="", reportId="", sortBy="", sortByTransform="", sortDirection="", parameterValues="",whatTarget, anchor, class, title, accesskey, hreflang, tabindex, onmouseOver, onmouseOut, onClick)}
- whatText - a string which will be the text of the link.
- customKey - the "key" in use by the initial query.
- queryID - the name of an addedValues query.
- reportId - the name of an addedValues report.
- sortBy - optional, the name of an addedValues variable.
- sortByTransform - optional, the name of an addedValues transform.
- sortDirection - optional, any string but significant only if it begin with the text 'reverse'.
- parametervalues - optional, default empty. Format is p1=val1&p2=val2 where p1, p2 .. are the names of parameters defined in queryID (using parameter(p1), parameter(p2)...) and val1, val2,... are the values to assign before running this query.
- whatTarget - optional, value of the target attribute for the link.
- anchor - optional, value of the anchor attribute for the link.
- class - optional, value of the class attribute for the link.
- title - optional, value of the title attribute for the link.
- accessKey - optional, value of the accesskey attribute for the link.
- hrefLang - optional, value of the hreflang attribute for the link.
- tabindex - optional, value of the tabindex attribute for the link.
- onmouseOver - optional, value of the onmouseOver attribute for the link.
- onmouseOut - optional, value of the onmouseOut attribute for the link.
- onClick - optional, value of the onClick attribute for the link.
Examples
| {addedValueMacros.queryRedoLink("xx", "xx")} |
Good example needed here.
Semantics
The query macro performs a "canned" search using the query named queryID, and produces a string using the specified report. The queryRedoLink macro provides a way to "rerun" a query with different values of sortedBy or initialvalues. It builds a link to the page where the call to the query macro was made, with flags to tell the query macro to use different run time values. When used with queries with parameters, this is a very powerful feature.
One use for this, is to create reports whose column headers are links to sort the entries according to the values of a variable different from that used previously (in the query options or in the call to the query macro).In this website, reports showign all stories, all pictures and all gems, have clickable column headers that chnage the sort order, using this technique.
See also