[HELP] Reuse in frontmatterin form input

I have migrated my page template to

command:  new glossary
suggestedName: "devops/glossary/${os.date('%Y-%m-%d')}"
confirmName: true
openIfExists: true
tags: meta/template/page
frontmatter: |
  title:  ${ string.split(editor.getCurrentPage(),"/")[#string.split(editor.getCurrentPage(),"/")]}

I want to parse input page name to transform and insert it frontmatter title.
editor.
getCurrentPage() = name of page where I start the command
Do you have an idea?