Hi, I’m using a template with a query to find pages in directories and list them on my index page. Likes this:
\```template
| Name | Date | Size |
|---|----|----|
{{{page select page where name =~ 'Linux' select name, lastModified, size order by displayName asc render [[Library/Core/Query/ListPagesLastMod]] }}}
\```
The ListPagesLastMod.md contains this:
---
tags: template
description: A page reference link as a list item
---
| [[{{name}}]] | {{lastModified}} | {{size}} |
However, some page names start with a lower-case letters, some start with upper-case ones, and this breaks the sort (because lowercase a comes after uppercase Z, code-wise).
My question is: Is there a way to ignore case when sorting?
I’m using past tense as it would probably be best to update to v2 sooner or later as v1 is slowly getting phased out. And in v2 stuff like this is much nicer as you have seen.
Hi @MrMugame , thanks for the function. Could you please elaborate a little but on where should I place the function definition so that I can use it in the template macro? It seems I can’t simply put it somewhere into the macro as I get a syntax error when I do so.
Also, thanks for reminding me there’s the v2 - if I read the announcement correctly, I’ll have to wait until upgrade for “pure Deno” deployment is covered as well.