Page Name Problems in V2.3.0

Hi,

I’ve written a little lua function to extract the page name from a file. I’m using it to create meeting notes. Now I’m facing the problem that it broke while switching from version 2.2.1 to 2.3.0 and I’ve got no clue why. Maybe someone can help?

Function:

function meetingName(input)
  if not input then
    return input
  end
  local pos = input:find("_")
  if not pos then
    return input
  end
  local nameWithoutPrefix = input:sub(pos + 1)
  return nameWithoutPrefix:gsub("[_%-%+]", " ")
end

Call from template:

${meetingName(editor.getCurrentPageMeta().name)}

I’ve been using it to convert “Meetings/2025_12_05_next_steps” to “next steps”.

Anyone any hint? :blush:

Shown error is:

Lua error:  Error evaluating "meetingName(editor.getCurrentPageMeta().name)": attempt to index a nil value

And in the background it navigates to Library/Std/APIs/Template

${meetingName(editor.getCurrentPage())}

this should fix it
but you’ll get “12 05 next steps” not “next steps” with your find/gsub combo

i guess you don’t want to stick to the same exact convention to name your page: i.e. always begin with “Meetings/Year_Month_Day_” ?

Thank you! With your fix it’s working again.

The find/sub combo ist working for me. It simply cuts after the date so I can use it as a clean header in created file.

Edit:
Just seen I’ve promoted the wrong example. My input name is something like ‘Meetings/2025-12-06_title’ which will be converted to ‘title’. Everything before the first underscore will be thrown away.
The first part is set by a template :blush: