Problem/Motivation

No view title is rendered. (Neither is a field label, but that is another issue.)

Proposed resolution

Add an option to render the view title and add a setting (disabled by default to not break existing installations) to show the views title.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

geek-merlin created an issue. See original summary.

le72’s picture

Same here. Any update or fix?

sergey_gabrielyan’s picture

StatusFileSize
new738 bytes
anybody’s picture

Version: 8.x-1.x-dev » 2.1.x-dev
Status: Active » Needs work

Running the title through t() is no option. Needs work and a clean solution. Seems to be an edge-case?

anybody’s picture

Okay after looking into this again I see that @geek-merlin made a valid request here, but the implementation in #3 is totally wrong and different. I'll hide it for that reason.

Adding an option to show the views title or use it as label is valid!

anybody’s picture

I guess all useful views settings should be exposed. Guess https://www.drupal.org/project/viewsreference has implementations for that!

Should also then be combined with #3443048: Allow the Views plugin to support defining items per page

anybody’s picture

I added the need for a setting (checkbox) to the issue summary. I think that's the most important part. Everything else should be clear enough?

anybody’s picture

Priority: Normal » Major
Issue tags: +Novice

Would someone like to prepare a MR accordingly? Maybe it's a nice novice task?

anybody’s picture

Assigned: Unassigned » grevil

grevil made their first commit to this issue’s fork.

grevil’s picture

Assigned: grevil » anybody
Status: Needs work » Needs review
Issue tags: -Novice

This should do the trick, although we should still discuss this approach.

anybody’s picture

Assigned: anybody » thomas.frobieter
Issue summary: View changes
StatusFileSize
new16.03 KB

@grevil: entity_extra_field already uses a twig template, but of course we could put one within for the views renderer.

I'm a bit unsure if the expected behavior here would be to have the views title overriding the entity_extra_field title or if it should be additional. Maybe @thomas.frobieter has an opinion on that?

I think it might make sense to override this label with the views title if the new View Title display option is enabled?

grevil’s picture

Assigned: thomas.frobieter » grevil
Status: Needs review » Needs work

@anybody, Ah I see! Thanks!

I already added validation, so that "display_label" and "render_view_title" can't be both enabled, but I agree, additonally the view title should simply override the "label" of the entity extra field. I'll check if that is easily implemented, since the label comes from the entity_extra_field entity and the view title is set in the view plugin definition.

grevil’s picture

Assigned: grevil » Unassigned
Status: Needs work » Needs review

Alright, that should do the trick! Please review!

anybody’s picture

Status: Needs review » Needs work

Nice @grevil! I think that makes sense! I left a final comment, but would be great if the others could already review it also. LGTM

anybody’s picture

Status: Needs work » Needs review
anybody’s picture

Status: Needs review » Reviewed & tested by the community

Works like a charm @grevil!!! Thank you! Merging!

Please tag a new release with all these highlights :)

grevil’s picture

Title: Add option to render view title » Add option to render view title and add schema check tests
Status: Reviewed & tested by the community » Needs work
grevil’s picture

Nice, tests fail as expected, adding missing schema.

grevil’s picture

Status: Needs work » Needs review

Everything green now, please review! (Maybe a bit out of scope but I didn't want to create a seperate issue for this)

anybody’s picture

Status: Needs review » Reviewed & tested by the community

Not a nice mix, but good enough, let's keep it like this!

Thanks again for the many improvements! :)

grevil’s picture

Status: Reviewed & tested by the community » Fixed

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.

anybody’s picture

Next all the tasks in #3578499: Add further options for Entity Extra Field "Views" should be focused.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.