Wikilinks and placeholders

Two questions for the community. If creating a new wiki-link doc using [[ method and template in wiki-link preferences (I am using markdown but not sure if makes any difference), is there any way of adding a title placeholder to the template, so that it matches the file name (which in turn matches what is typed in the enclosing brackets [[…]]. Or have I just missed this?

Secondly, anyone know of a method to automatically insert a back link into the new document (can’t see a placeholder for this) that would collect the item link from the document in which the wiki-link doc was created and place that into the document? A bit like the backlink function in the annotation pane. That would be great in organising but with DT3 never sure if it’s in there somewhere or just I am ignorant of how that could be done simply!

Also anyone notice when the first placeholder in the wiki-link template is a date or time, this appears only in source view but not the rendered view. If a line break placeholder is placed before it it renders (sorry that is a third question)


For your first question, you might be looking for %@

For your third, it might be that the inserted date is handled as metadata. For instance, if you have a template with

Created: %year%-...

# %@

the date will not be shown. If the date comes below the # %@ it should be shown, though.

Hi Deibel, I appreciate the suggestion, but does this method work with wiki-link preferences? I appreciate that you can use those placeholders in templates, and do have some of those, e.g. my annotation template, but not sure if those can be typed into the preferences of the wiki-link template and work. I was looking for a suitable placeholder in the contextual menu > insert placeholder. May be this is a gap in my understanding though.

That’s because it’s treated as MultiMarkdown metadata. See Help > Documentation > Documents > Markdown Documents…

You need to add a Return at the top of the document. You can specify it in the Wiki template section, like so…

Secondly, anyone know of a method to automatically insert a back link into the new document (can’t see a placeholder for this) that would collect the item link from the document in which the wiki-link doc was created and place that into the document?

This is not possible at this time. DEVONthink would have to support the %documentLink% placeholder like you can use in Annotation files. @cgrunenberg ? :thinking:

Hmm. As an alternative…

Since you’re using square bracket syntax and Markdown, you can pass the name in square brackets, like so…

From this Wiki template…

It doesn’t create an item link (which I mentioned above), but there is a functional WikiLink in the new Wiki document.

This was incredibly helpful @BLUEFROG !!! I’d love to see what else is possible with this function, it’s something I really would like to explore more but examples are by far the best way to learn.

You’re welcome. . :slight_smile:

WikiDocs are in this weird place where they don’t make sense… then they do :bulb:… then they’re overused :roll_eyes:
But I hope it gives you (all) a bit of inspiration.

1 Like

Placeholders IN GENERAL in DT3 are a major blind spot for me…I always forget that they are there in a context menu. Is it possible to set a hotkey to open that menu and navigate it with a keyboard? It’s not that I don’t like the mouse, it’s more that I generally just plain forget to use the mouse when I want to be adding text (which, ultimately, a placeholder is).

Sorry but no there is no built-in shortcut for this.

You could use Better Touch Tool to set keyboard shortcuts / hotkeys to any context menu item. I’m using this for something else with a trackpad gesture, but it works with keyboard shortcuts too.

My mind…it is blown. :exploding_head:

This is SO USFUL. I use Keyboard Maestro hundreds of times per day but I don’t think it’s nearly as easy to get access to context menus from KM. I have BTT installed and use it for other things, but this is AMAZING. Thank you!!

1 Like

You’re welcome. I’m so used to BTT that I couldn’t use my Mac without it any more, it’s actually giving me anxiety (bus scenario).

1 Like

Semi-off-topic, but do you know way to set Cmd-E to toggle between Preview and Source view using BTT? I am so used to that from Obsidian that when I work in DT3 having to remember Cmd+Ctrl+X or Cmd+Ctrl+P to swap is so…painfully difficult. Thanks!

You could bind the same cmd+e shortcut to both DT shortcuts in BTT, which would then result in a menu provided by BTT opening in the DT document. It’s not a toggle, but the menu pops up at the cursor, so it’s not a huge travel.
Otherwise, you could just use cmd+w for one of those, which would be close to cmd+e.

Ah, I see, that makes sense…I didn’t know that, thank you.

That is awesome anyway, what a clever suggestion. I also think we need to thank he dev team for the handy convert to item link in the contextual menu, which makes it easy to insert a markdown link.

Is there any way to place the name of the new document in the body of the newly created text ( the content between [[…]] )? I assume not at this stage.

Pretty happy with the wiki-link back link method you came up with, thank you!

You’re welcome :slight_smile:

No, that’s not currently possible.