Closed (fixed)
Project:
Name Field
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
25 Feb 2014 at 02:05 UTC
Updated:
31 Mar 2018 at 09:34 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
alan d. commentedSince there is already code to allow SPAN classes through the formatter, this should not be too difficult (hopefully)
General wrapper could be similar to:
Or individual components.
givenName Text Given name. In the U.S., the first name of a Person. This can be used along with familyName instead of the Name property.
additionalName Text An additional name for a Person, can be used for a middle name.
familyName Text Family name. In the U.S., the last name of an Person. This can be used along with givenName instead of the Name property.
honorificPrefix Text An honorific prefix preceding a Person's name such as Dr/Mrs/Mr.
honorificSuffix Text An honorific suffix preceding a Person's name such as M.D. /PhD/MSCSW.
Does not appear to use generational suffix
I guess this should be an optional wrapper, name is just one component of a Person
Comment #2
alan d. commentedComment #3
alan d. commentedSo RDFa support is inbuilt into core.
<article typeof="schema:Person">
And the module Schema.org configuration tool (RDF UI) can allow you to add the property="type:name"
https://www.drupal.org/project/rdfui
That leaves the components themselves, (if required). So added field formatter support for:
Complete mapping wasn't possible using schema:Person Name, aka there isn't direct support for the preferred or generational suffix (albeit the latter could be part of the family name...)
Key map follows:
The existing Markup formatter option was hijacked for this role.
The Output formatter option was dropped in the process of this patch.
The NameParser and NameFormatter now returns a Formattable object (\Drupal\Component\Render\MarkupInterface), rather than a potentially mixed string or MarkupInterface object.
Comment #5
alan d. commentedProbably not enough interest to backport :/