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

TOPIC:

Can I display the name suffix on the name line in charts, lists and reports? 1 month 6 days ago #1

  • stuttfeiten
  • stuttfeiten's Avatar Topic Author
  • Offline
  • New
  • New
  • Posts: 2
Hi,

Today I deleted a 10+ year old PHPGedView version from my server, wiped the database and installed webtrees v.2.0.4 (on PHP 7.2).

I had no problems installing and importing the gedcom was painless (Gedcom 5.5.1 created with Legacy Family Tree).

So far everything looks good. Except one thing. I can't figure out how to get the name suffix (NSFX) to show on the name line on charts, lists, reports and search results.

I cannot figure out a way to do this from the control panel.

I remember managing this in PGV by changing or adding to the code in some of the .php files when I installed PGV, but I've hardly had a .php file open in notepad in the last 10 years, and I'm a newb with code anyway, so I can't easily find my way round in the code of webtrees.

The raw gedcom file looks something like this:
1 NAME John /Doe/
2 GIVN John
2 SURN Doe
2 NSFX Junior

The above shows up as "John Doe" in the name line on pages, charts, lists etc., but I'd like it to show as "John Doe Junior"

Are there settings I have missed or will I have to edit files directly to achieve this?

Thank you in advance for any input or advice!

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

Can I display the name suffix on the name line in charts, lists and reports? 1 month 6 days ago #2

  • fisharebest
  • fisharebest's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 13196
> Are there settings I have missed or will I have to edit files directly to achieve this?

You will need to edit your file.

The "NAME" field is the person's full name - as you would like it displayed.

The sub-tags (GIVN, SURN, NSFX, NICK, etc.) are used to sort/search names.

So, webtrees will always display the NAME field, but use the others for sorting.

A common use of this is for the NAME field to contain an inflected version of the surname (e.g. feminine, diminutive, etc.), while the SURN field contains the base version.

This allows us to sort Kowalska / Kowalski together.
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.

Can I display the name suffix on the name line in charts, lists and reports? 1 month 6 days ago #3

  • fisharebest
  • fisharebest's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 13196
PS - I think you can fix this easily in the control panel.

Family tree -> Data fix -> Search and replace

Search for
(\n1 NAME .*/)(\n(2.*\n)*(2 NSFX( .*)\n))

Replace with
$1$5$2

Search type: Regular expression
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.

Can I display the name suffix on the name line in charts, lists and reports? 1 month 6 days ago #4

  • stuttfeiten
  • stuttfeiten's Avatar Topic Author
  • Offline
  • New
  • New
  • Posts: 2

fisharebest wrote: PS - I think you can fix this easily in the control panel.

Family tree -> Data fix -> Search and replace

Search for

(\n1 NAME .*/)(\n(2.*\n)*(2 NSFX( .*)\n))

Replace with
$1$5$2

Search type: Regular expression


Thank you very much, that's the trick! You just made my day Sir! First a successful launch in Florida , then a successful fix.

Raising my glass in your general direction; Cheers!

Edit: typo

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

Last edit: by stuttfeiten.
  • Page:
  • 1
Powered by Kunena Forum