Hello, the Reference page view mode I show it as a table. But I have seen that when I visualize a reference the title does not appear, which I think is necessary.
I have checked 'Manage presentation' and the title field does not appear there. Does anyone know where I should modify the code to make it appear?

CommentFileSizeAuthor
#3 2957792-3.patch1.35 KBflocondetoile

Comments

jcsp0003 created an issue. See original summary.

antongp’s picture

Hi! For now I would suggest using Display Suite and adding token field via it. The Bibliography & Citation doesn't specially expose title on Manage Display for now. There is related at some degree issue in Drupal core: #2353867: [META] Expose Title and other base fields in Manage Display

flocondetoile’s picture

Status: Active » Needs review
StatusFileSize
new1.35 KB

Hello,

Waiting the related core issues landed, we could provide an extra field for the reference title. It's a pity that the table does not contain the reference's title.

The patch attached add this extra field.
What do you think ?

flocondetoile’s picture

Hum not sure #3 is a good workaround. Because you have to remove on ALL the reference types this extra field for the view mode citation.

antongp’s picture

Thank you for your efforts. But I really worry about removing such extra field from the module then, once related core issues are resolved. It's not a big problem to add this to the module, but removing will be harder since it'll be used by some of module's users, maybe update path will have to be implemented in this case and I'm not sure for now how much effort it could require. Maybe attach a patch to this issue with complete extra field implementation but which will never be committed to the module, or code snippet of how it can be implemented in custom code, so users who really need this feature will be completely responsible for switching to the core's implementation in future. What do you think?

flocondetoile’s picture

I think it's a good deal :-)

flocondetoile’s picture

Also...I wonder if it would not be much simpler to build the table element directly in the twig template instead of doing it in the preprocess function. And it would be easy, with a simple template override, for anyone who needs it, to add the title of the reference. As does node module finally. Thought?

flocondetoile’s picture

Status: Needs review » Active
mark_fullmer’s picture

Status: Active » Closed (outdated)

Given this issue hasn't received further attention in quite a number of years, I'm going to close this so maintainers can more easily triage issues that have active demand. If this is still a priority, please consider opening a new issue.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.