Problem/Motivation
Split out from #3033301: Add formatters and other mechanisms as alternative to base fields directly in entity templates.
Steps to Add/select title formatter :
- Go to any entity like node: https://your_site_url/admin/structure/types/manage/article/fields
- Add plain text field(for eg Sub Title) from manage field tab of content type, then go to manage display of content type:
https://your_site_url/admin/structure/types/manage/article/display
- Here you find the newly added "Sub Title" field & next to it, there is "format column" display where you 'll see now "Title" option visible to select, along with it there is additional settings that you can configure by clicking "setting icon" that displaying next to it.
In additional setting there are two "format settings" are available :
- Link to the Content: if you enable the checkbox then this newly added field (For eg: Sub Title) content 'll be linked to it's node itself.
- Tag: In it, these options h1,h2,h3,h4,h5,h6,span,div are available to select, when this newly added field (For eg: Sub Title) content render then you 'll see selected tag 'll wrap the content on FE.
Proposed resolution
Create a TitleFormatter, copying code from Manage Display module. It should be fine with minimal changes.
Write a test.
Remaining tasks
Review
UX review
Screenshots