Web based family history software

Question [SOLVED] Extract all TITL facts to add after accordian

  • larrydanger
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
4 years 1 month ago #1 by larrydanger
I want to extract the value of the level 1 TITL facts to insert them uneditable in the name accordion or the add-on with gender.

I can do this by brute force on the database Gedcom, but I assume there is a more elegant way to do this. Nut I don't know where it is.


More about. TITL is a level 1 INDI event (not to be confuse with the TITL in SOUR). It has the event detail substructure to which I added two _ASSO tags intended for "Predecessor" and "Successor" I would like to show the values of the TITL near the name box, but keep the gritty details and their editing in facts and events.

Example of the fact:

1 TITL Count of Rouen
2 DATE FROM 911 TO 928
2 PLAC Rouen, West Francia
3 MAP
4 LATI N49.44
4 LONG E1.1
2 _ASSO @I3916@
3 RELA successor

(where @I3916@ is William Longsword )


But I want this to appear near or in the name accordian

Title: Count of Rouen

and if there really had been such a title at the time:

Title: Duke of Normandy

from a similar fact.

If I can get an array of all the level 1 TITL values, I am pretty sure I can get it into the name accordian or the add-on, but what is the good way to get the array?

Laurence Eighner Hexamer

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

More
4 years 1 month ago - 4 years 1 month ago #2 by fisharebest
Replied by fisharebest on topic Extract all TITL facts to add after accordian
> I would like to show the values of the TITL near the name box

Yup - that makes good sense.

github.com/fisharebest/webtrees/issues/3071

> but keep the gritty details and their editing in facts and events.

Because you think this is better - or just because it is easier to implement?

I would have thought it better to keep all title display/edit/etc. together.

>but what is the good way to get the array?

This will give you all the TITL facts for an individual.
Code:
$individual->facts(['TITL'], true)

Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net
Last edit: 4 years 1 month ago by fisharebest.

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

  • larrydanger
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
4 years 1 month ago #3 by larrydanger
Problem solved.

Laurence Eighner Hexamer

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

Powered by Kunena Forum
}