I am missing the "Theme Information" in Views UI in Drupal 8 where one can find template suggestions for the actual view. In Drupal 7 it was the last option at "Advanced-Other" in Views UI. Now in Drupal 8 "CSS Class" is the last option there.

Is this still missing or not to be meant for Drupal 8?

Comments

dawehner’s picture

Status: Active » Fixed

The idea is to enable twig debug (Note: this requires #2118743: Twig debug output does not display all suggestions when an array of theme hooks is passed to #theme to be in, feel free to help there :)).

Status: Fixed » Closed (fixed)

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

BrijeshParmar’s picture

Status: Closed (fixed) » Active

Still not able to find any solution,
Any help or advice is welcome.

dawehner’s picture

Status: Active » Fixed

... views no longer provide suggestions.

stefan.korn’s picture

@Brijesh_Parmar: You can have similar results if you use TWIG debugging, read here: https://www.drupal.org/node/1906392 - not in the same place and maybe not as comfortable as in D7 views but at least with the same informations.

dawehner’s picture

Thank you @stefan.korn for giving support!

Status: Fixed » Closed (fixed)

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

rogerb’s picture

I am using Drupal 8.4.3 and have twig debugging turned on but I am not seeing template suggestions for views. For other templates yes, but not for views.

stefan.korn’s picture

@RogerB: You are right, there is no usable debug output for views actually. I was a bit to enthusiastic about TWIG debug in #5 and did not recognize that Views does not correctly deal with TWIG debug output.

Actually there is https://www.drupal.org/project/drupal/issues/2118743 and https://www.drupal.org/project/drupal/issues/2923634 tackling this issue. While the issue was first since discovering handled with issue https://www.drupal.org/project/drupal/issues/2118743 and there seems to be a patch, lastly it was discovered that views is handling the theme template suggestions not correct (using an outdated views specific way for theme suggestions that is not compatible with the twig debug output for template suggestions). So now it seems that https://www.drupal.org/project/drupal/issues/2923634 will bring views up to date about the suggestions generating method and hopefully we would see this committed soon.

Meanwhile you can try one of the patches and see if that helps on that. Or you can take a look into code of https://api.drupal.org/api/drupal/core%21modules%21views%21src%21ViewExe... and see what suggestions will be built. This is for the most hooks, except for views_view_field hook, there is this function https://api.drupal.org/api/drupal/core%21modules%21views%21src%21Plugin%...

maxplus’s picture

The patch #8 from https://www.drupal.org/project/drupal/issues/2923634#comment-12417950 indeed solved this issue for me and now showing all theme suggestions in twig debug

jayemel’s picture

I'm dissappointed that the solution is to comb 2995+ lines of HTML source for a given page to find the template suggestions, when, previously in 7, I could do it with one click on the view edit page.

Then, according to this thread, I also have to patch views to even get the suggestions?

I appreciate all the hard work gone into Drupal 8, but this really seems like a step backwards to me and will certainly be a development hurdle even once it's working correctly.

dgtlmoon’s picture

jmuzz’s picture

I sort of agree with @jmljunior . I never liked that views had a different way of handling this but I hope that the theme debug option isn't meant to be the end of theme debugging and we can someday get devel_themer functionality again.

candelas’s picture

Really sad that "Theme Information" is removed from a site builder point of view.

nchase’s picture

it's another example of those stripped away tools that were pretty usefull in d7. :(

back from 7’s picture

I agree with @Nchase.

Drupal 8 is way more complicated with simple tasks.

Drupal 8 is also way better at other tasks. Not sure how I feel about 8, since I am developing my first site.

The process of even getting "Theme debug" tuned on is not friendly. Still, the options for views templates seem limited compared to D7

lubwn’s picture

I agree. We want this functionality back in the UI of views. Why was it stripped in the first place?

lunk rat’s picture

I miss it right now.

xem8vfdh’s picture

I'd sure love to have this functionality back, so simple :(