Generate page from template and keep folder structure

I’m attempting to create a rolodex/personal relationship manager tool where I can keep track of stuff about people I interact with. For example, birthdays, anniversaries, etc. I have a space structured so that adding a new person goes to page for “Person/John Doe”

I want to have a discussions “inbox” where I can keep notes for discussions with each respective person. I can’t seem to figure out how to generate the new template inside “Person/John Doe/Discussions/2024-03-20 17:34”. The key part that is that the name (John Doe) is a variable that I cannot seem to find a way of pulling. I have the following currently setup to create a command. This is used in a command (button) on the person/John Doe page.

---
tags:
  - template
hooks.newPage:
  suggestedName: "person/{{@page.name}}\/Discussion/{{today}}"
  command: "New Discussion"
openIfExists: true
frontmatter:
  tags:
    - discussion
---

Upon clicking the button from person/John Doe, a new page is generated, but @page.name is blank with the following name: “person//Discussion/2024-03-20”

Is there a way I can compel a quicknote-like template pull the existing space and go deeper in the folder structure (i.e. append “Discussions/{{today}}” onto “person/John Doe”)?

What does your command button look like? How about the command behind the button? I guess what I was thinking is that you would need to define some frontmatter instead of trying to use @page.name because that would be Person/John Doe no?

--- frontmatter
fullName: 'John Doe'
---

…then you could pass fullName to your command button as mentioned in the Command Links Page, you might have to wrap the command button in a template block too in order to leverage the expression language and access the attribute in the frontmatter.

I have a similar use case to this but I have not been able to make it work. Even if I pass the page name as an argument to the command link using a template, it doesn’t fill the page name input text with the command input.

It only works for the commands ‘Navigate to page’ or ‘Navigate to URL’ but then it doesn’t ask for the page name.

Am I doing something wrong?