Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 294800

Add a Title Formatter

$
0
0

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.

title-formatter

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.

configure-settings

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

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet


Viewing all articles
Browse latest Browse all 294800

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>