Before asking for help please read "How to request help" by clicking on that tab above here.
  • Page:
  • 1

TOPIC: Shortcode/linking to individuals in notes

Shortcode/linking to individuals in notes 2 months 1 day ago #1

  • clivejo
  • clivejo's Avatar Topic Author
  • Offline
  • New
  • New
  • Posts: 34
I know I can use the short code @I0001@ to link to a record, but how do I display a name, instead of a number whilst writing the note.

For example , I have a photo with a number of people in it, some of which are in my file. The note reads "John and Jane Doe at John's brothers wedding" and John Doe is I1 with Jane Doe I2, how do I hyper-link the names to take the user to their records?

Please Log in or Create an account to join the conversation.

Shortcode/linking to individuals in notes 2 months 1 day ago #2

  • fisharebest
  • fisharebest's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 12929
> I know I can use the short code @I0001@ to link to a record, but how do I display a name, instead of a number whilst writing the note.

This, of course, is not standard GEDCOM. XREFs are not permanent identifiers.
In theory, they exist only while transferring data from one application to another.
So, using them like this creates the risk that if/when you transfer your data to another
application (which does not preserve XREFs), then these links become invalid.

There is no simple/automatic way to use the name of the linked record as the text
for the link. It would require a code change. Create an issue on the github tracker,
and I'll look at it.
Greg Roach - This email address is being protected from spambots. You need JavaScript enabled to view it. - fisharebest.webtrees.net

Please Log in or Create an account to join the conversation.

Shortcode/linking to individuals in notes 2 months 1 day ago #3

  • clivejo
  • clivejo's Avatar Topic Author
  • Offline
  • New
  • New
  • Posts: 34
Maybe allow custom text via a separate variable?

https://github.com/fisharebest/webtrees/issues/3144

Please Log in or Create an account to join the conversation.

Last edit: by clivejo.

Shortcode/linking to individuals in notes 2 months 1 hour ago #4

  • clivejo
  • clivejo's Avatar Topic Author
  • Offline
  • New
  • New
  • Posts: 34
Thanks for the fix.

How hard would it be to pass a custom string to be displayed for the hyperlink text? My use case for this feature is an obituary for example. "John Doe is survived by his wife Jane, son John Jr and daughter Mary"

But when using the current fix this becomes "John Doe is survived by his wife Jane Mary Doe Janey, son John Peter Doe Junior and daughter Mary Joanne Doe Mae" With their nick name appearing at the end.

The goal is to make browsing the tree online easier by hyperlinking names in Wills, Family Photos, Obituarys etc to people who might exist in my tree.

For example:
@I0005@Uncle Peter@

Please Log in or Create an account to join the conversation.

Last edit: by clivejo.

Shortcode/linking to individuals in notes 1 month 4 weeks ago #5

  • fisharebest
  • fisharebest's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 12929
> How hard would it be to pass a custom string to be displayed for the hyperlink text?

Lots of complexity here, potential for false matches, etc.
@I0005@Uncle Peter@

@I0005@ (according to Peter@example.com)

A more "portable" option might be to use ASSO records to create links to references indivdiuals.
Greg Roach - This email address is being protected from spambots. You need JavaScript enabled to view it. - fisharebest.webtrees.net

Please Log in or Create an account to join the conversation.

Shortcode/linking to individuals in notes 2 weeks 2 days ago #6

You may be able to make a redirection from Markdown for:
@I0005@Uncle Peter@

Using Markdown - and some PHP:
[Uncle Peter](redir.php?pid=I0005)

And let redir.php redirect to the exact individual. Clumsy, but possible.

Is the path or GED name available as a variable?
{ö} Erik Bachmann

Please Log in or Create an account to join the conversation.

Shortcode/linking to individuals in notes 2 weeks 2 days ago #7

  • fisharebest
  • fisharebest's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 12929
I have already updated this

Currently, @I0005@ will be converted into

[@I0005@](URL of I0005)

In the next release, @I0005@ will be converted into

[name of I0005](URL of I0005)

I just created an example at dev.webtrees.net/demo-dev/tree/demo/note/X242
Greg Roach - This email address is being protected from spambots. You need JavaScript enabled to view it. - fisharebest.webtrees.net

Please Log in or Create an account to join the conversation.

Shortcode/linking to individuals in notes 2 weeks 2 days ago #8

Running v. 2.0.3 and @I0005@ simply shows up in notes as - @I0005@
{ö} Erik Bachmann

Please Log in or Create an account to join the conversation.

Last edit: by Erik Bachmann.
Do you need a web hosting solution for your webtrees site?
If you prefer a host that specialises in webtrees, the following page lists some suppliers able to provide one for you: 

Shortcode/linking to individuals in notes 2 weeks 1 day ago #9

  • fisharebest
  • fisharebest's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 12929

Erik Bachmann wrote: Running v. 2.0.3 and @I0005@ simply shows up in notes as - @I0005@


Wait for 2.0.4
Greg Roach - This email address is being protected from spambots. You need JavaScript enabled to view it. - fisharebest.webtrees.net

Please Log in or Create an account to join the conversation.

Shortcode/linking to individuals in notes 2 weeks 1 day ago #10

clivejo wrote: For example , I have a photo with a number of people in it, some of which are in my file. The note reads "John and Jane Doe at John's brothers wedding" and John Doe is I1 with Jane Doe I2, how do I hyper-link the names to take the user to their records?


Did you have a look on the modul Faces by Kirill Uksusov

I think it's exactly what you're looking for.

A simple example of it's use in my tree with a photo of three persons wt.rauhut.eu/tree/GAC.ged/media/M1014/Ro...the-Bernard-MAUPILER
Open the photo and hover with your mouse over the persons......

Please Log in or Create an account to join the conversation.

Last edit: by Andreas.

Shortcode/linking to individuals in notes 2 weeks 1 day ago #11

  • clivejo
  • clivejo's Avatar Topic Author
  • Offline
  • New
  • New
  • Posts: 34

Andreas wrote: Did you have a look on the modul Faces by Kirill Uksusov


Yes I have it installed, but what I would really like is the ability to link to people mentioned in obituaries, wills etc using custom hyper-link text. Currently the hyper-link text is the persons full name, which messes up the original text. For example, "x is survived by his wife Sue" becomes ""x is survived by his wife Susan Jane Doe 'Sue'"

Please Log in or Create an account to join the conversation.

Last edit: by clivejo.

Shortcode/linking to individuals in notes 2 weeks 1 day ago #12

  • fisharebest
  • fisharebest's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 12929
Why not

"x is survived by his wife Sue (@X1234@)"

This way you are showing both the original text, and an annotated link...
Greg Roach - This email address is being protected from spambots. You need JavaScript enabled to view it. - fisharebest.webtrees.net

Please Log in or Create an account to join the conversation.

Last edit: by fisharebest.

Shortcode/linking to individuals in notes 2 weeks 1 day ago #13

  • bertkoor
  • bertkoor's Avatar
  • Offline
  • Gold
  • Gold
  • Greetings from Utrecht, Holland
  • Posts: 1859

clivejo wrote: what I would really like is the ability to link to people mentioned in obituaries, wills etc using custom hyper-link text. Currently the hyper-link text is the persons full name, which messes up the original text. For example, "x is survived by his wife Sue" becomes ""x is survived by his wife Susan Jane Doe 'Sue'"


Imho you should keep the original text in the source (citation)
Links and other comments should (imho) be recorded separately, in the notes for instance.
stamboom.BertKoor.nl runs on webtrees v1.7.13

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Powered by Kunena Forum