Joey pointed out that sort=x usually takes a sort order.
# Metadata collection that needs to happen during the scan pass.
if ($key eq 'title') {
$pagestate{$page}{meta}{title}=HTML::Entities::encode_numeric($value);
- if (exists $params{sort}) {
- $pagestate{$page}{meta}{titlesort}=$params{sort};
+ if (exists $params{sortas}) {
+ $pagestate{$page}{meta}{titlesort}=$params{sortas};
}
else {
$pagestate{$page}{meta}{titlesort}=$value;
}
elsif ($key eq 'author') {
$pagestate{$page}{meta}{author}=$value;
- if (exists $params{sort}) {
- $pagestate{$page}{meta}{authorsort}=$params{sort};
+ if (exists $params{sortas}) {
+ $pagestate{$page}{meta}{authorsort}=$params{sortas};
}
else {
$pagestate{$page}{meta}{authorsort}=$value;
be set to a true value in the template; this can be used to format things
differently in this case.
- An optional `sort` parameter will be used preferentially when
+ An optional `sortas` parameter will be used preferentially when
[[ikiwiki/pagespec/sorting]] by `meta(title)`:
- \[[!meta title="The Beatles" sort="Beatles, The"]]
+ \[[!meta title="The Beatles" sortas="Beatles, The"]]
- \[[!meta title="David Bowie" sort="Bowie, David"]]
+ \[[!meta title="David Bowie" sortas="Bowie, David"]]
* license
Specifies the author of a page.
- An optional `sort` parameter will be used preferentially when
+ An optional `sortas` parameter will be used preferentially when
[[ikiwiki/pagespec/sorting]] by `meta(author)`:
- \[[!meta author="Joey Hess" sort="Hess, Joey"]]
+ \[[!meta author="Joey Hess" sortas="Hess, Joey"]]
* authorurl
as such, ("1 2 9 10 20" instead of "1 10 2 20 9")
"""]]
[[!if test="enabled(meta)" then="""
-* `meta(title)` - Order according to the `\[[!meta title="foo" sort="bar"]]`
+* `meta(title)` - Order according to the `\[[!meta title="foo" sortas="bar"]]`
or `\[[!meta title="foo"]]` [[ikiwiki/directive]], or the page name if no
full title was set. `meta(author)`, `meta(date)`, `meta(updated)`, etc.
also work.