+
+ if (! defined wantarray) {
+ # Running in scan mode: only do the essentials
+
+ if (yesno($params{trail}) && IkiWiki::Plugin::trail->can("preprocess_trailitems")) {
+ # default to sorting by age with fallback to title,
+ # the same as inline itself, but let the params
+ # override that
+ IkiWiki::Plugin::trail::preprocess_trailitems(sort => 'age title', %params);
+ }
+
+ return;
+ }
+
+ if (yesno($params{trail}) && IkiWiki::Plugin::trail->can("preprocess_trailitems")) {
+ scalar IkiWiki::Plugin::trail::preprocess_trailitems(sort => 'age title', %params);
+ }
+