help! modify Annotation template to link back to parent grou

Hello,

The DT included Annotation template works great for me and I really like how each note includes a link back to the original document. However, it would be really useful for each note to also have a link back to the parent group the document was in. So if the group is structured like this:

group 1: paper A
sub-group 1: abstract
sub-group 2: original_pdf
sub-group 3: results

and I make a note on original_pdf, then the note will contain a link to the original_pdf (as it already does) and I would like it to contain a link to the parent group, group 1: paper A.

I noticed if I make a note and right-click then I can manually add in a link to the appropriate group, so my guess is there is some way to automate this? Could anyone provide me with the actual line of code to add to the Annotation template to do this? Or guide me in the correct direction?

Thanks!

See e.g. viewtopic.php?f=20&t=11416