Just in regards to this, in Devonthink you can set it so that when you choose Devonthink in the Hook To New menu, it offers you a pop up list with everything in Devonthink’s Template Folder. Anything you pick from the pop up list will be hooked to your original item (and tagged, should you so choose). This includes any file type Devonthink supports, including groups.
In case you’ve never found it, in Devonthink, go to Data>New From Template>Open Templates Folder. Every item in that folder will appear in the pop up list. You might want to delete all the templates you never use, for simplicity’s sake.
Once there, you need to create a template group. Its a bit odd, but simple. In Finder, create a new folder, and call it Group. Then open the folder and create another folder, and call that Group as well. Then go back to the original folder, and rename it so that it has .dtTemplate at the end.
Now when you pick it from the list, it will create all the items in the Group.dtTemplate folder, which is just a single group. The group will be renamed to match whatever Hookmarks gives it.
As for the Hookmarks code, replace the default Script in Hookmarks with the below. Note that you have to match the path to Devonthink as per your install.
set thePath to "/Users/[INSERT YOUR USER]/Library/Application Support/DEVONthink 3/Templates.noindex"
tell application "System Events"
set templateList to {name, POSIX path} of every disk item of folder thePath
end tell
tell application id "DNtp"
set theTitle to "$title"
set theTemplate to choose from list templateList's item 2
set newItem to import template (theTemplate as string) to incoming group of current database
set name of newItem to theTitle
set the tags of newItem to "Project Support"
set refURL to reference URL of newItem
end tell
open location refURL
get refURL
I cobbled this together with superglue and string, if anyone can improve upon it, that would be awesome. But it works.
You can also change the format of the title and the tag if you wish, this is just what I use.
The downside to this is that the list if offers you is a simple list of every item in the templates folder by full file path. So its not pretty, and once you get above about 15 items its hard to spot things. But it works for me.