- Posts: 82
Question Shortcode/linking to individuals in notes
- clivejo
- Topic Author
- Offline
- New Member
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.
- fisharebest
- Offline
- Administrator
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 - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net
Please Log in or Create an account to join the conversation.
- clivejo
- Topic Author
- Offline
- New Member
- Posts: 82
Please Log in or Create an account to join the conversation.
- clivejo
- Topic Author
- Offline
- New Member
- Posts: 82
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:
Please Log in or Create an account to join the conversation.
- fisharebest
- Offline
- Administrator
Lots of complexity here, potential for false matches, etc.
A more "portable" option might be to use ASSO records to create links to references indivdiuals.
Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net
Please Log in or Create an account to join the conversation.
- Erik Bachmann
- Offline
- New Member
- Posts: 36
Using Markdown - and some PHP:
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.
- fisharebest
- Offline
- Administrator
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 - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net
Please Log in or Create an account to join the conversation.
- Erik Bachmann
- Offline
- New Member
- Posts: 36
{ö} Erik Bachmann
Please Log in or Create an account to join the conversation.
- fisharebest
- Offline
- Administrator
Erik Bachmann wrote: Running v. 2.0.3 and @I0005@ simply shows up in notes as - @I0005@
Wait for 2.0.4
Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net
Please Log in or Create an account to join the conversation.
- Andreas
- Offline
- Premium Member
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......
Both MAUPILLÉ & RAUHUT families are using webtrees V2.1.18
Please Log in or Create an account to join the conversation.
- clivejo
- Topic Author
- Offline
- New Member
- Posts: 82
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.
- fisharebest
- Offline
- Administrator
"x is survived by his wife Sue (@X1234@)"
This way you are showing both the original text, and an annotated link...
Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net
Please Log in or Create an account to join the conversation.
- bertkoor
- Away
- Platinum Member
- Greetings from Utrecht, Holland
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.