Clickable Markdown Links using placeholder text from YAML metadata

For my note taking, it would be excellent if I could take advantage of placeholder text when constructing links between documents.

For example, in the YAML header for a document, I might add this line:
articlePageLink: x-devonthink-item://02E67379-557A-46C0-BF4C-A42A3D51828D?page=
Notice that after the item link, I added ?page=. Now in the body of my document, I can type the placeholder %articlePageLink + the number of the page I’m citing to easily construct a URL for that page. But it doesn’t work like a link - it’s just text. I’ve tried incorporating these placeholders into a couple different markdown syntax, but as far as I can tell, no syntax is capable of creating clickable links using the placeholder text.

Below I’m pasting the markdown source code and a screenshot of the rendered text for a note where I attempted to use this placeholder trick.

---
articlePageLink: x-devonthink-item://02E67379-557A-46C0-BF4C-A42A3D51828D?page=
---
# Annotations for [[Beller - Paying Attention The commodification of the sensorium (2007)]]

Lorem ipsum.  
> Lorem ipsum.
[Page 5]

Lorem ipsum.
> Lorem ipsum
[Page 7]

> Lorem ipsum.  
[Page 8]

[test page]
<[%articlePageLink]6>
<x-devonthink-item://02E67379-557A-46C0-BF4C-A42A3D51828D?page=6>

[Page 5]: x-devonthink-item://02E67379-557A-46C0-BF4C-A42A3D51828D?page=4
[Page 7]: x-devonthink-item://02E67379-557A-46C0-BF4C-A42A3D51828D?page=6
[Page 8]: x-devonthink-item://02E67379-557A-46C0-BF4C-A42A3D51828D?page=7
[test page]: [%articlePageLink]6

In the screenshot you can see at the bottom of the page the text of the DEVONthink item link I used is rendered in an identical way. The only differences is that the line using placeholder text doesn’t create a hyperlink.
And the line above it (“test page”), isn’t really clickable, either.

Creating a URL isn’t the function of a placeholder. It’s a placeholder for text so it’s working as intended.

1 Like

Did you try that without pointy brackets? Those are delimiter for HTML tags, which are permitted in MD.

Yes, I tried with and without the brackets. In preview mode, regular item links aren’t clickable unless they’re in brackets. (Otherwise they’re just plain text.) And item links using placeholder text aren’t clickable under any circumstances, afaik.

According to the MMD definition, metadata is available in headers and body text. I suppose it’s just not possible to use it in a link, given that the syntax is [%tag]. So for a link, you’d have to use (theoretically) [[%tag]]. Which will probably not give the desired result because the content of [] is not parsed but just inserted in the href attribute “as is”.

All this is not related to DT per se. It’s a limitation or feature of the markdown dialect.