- Issue created by @vinaysamant
I have custom comments type - entry, to be attached to custom content type - ledger. Entry contains date, title and amount. i want to customise output as 3 columns displayed like table. I have copy-pasted "comment.html.twig" and created "comment--field-entries.html.twig" which works perfectly.
i m using views to control display of this (and all) content type. Thus i added comments field to the view where-ever required. 1st thing i noticed is, it shows comment form below all the comments. to modify this i overridden "field--comment.html.twig" by various naming conventions.. No luck.
Problem is, then "comments" field is used in views, it does not hook this "field--comment.html.twig" or "field--field-entries.html.twig". it should be something like - views-view-field--all-pages--field--field-entries.html.twig. I tried many many combinations for this template. Nothing worked. And twig debug does not provide any suggestions..
create custom comments with some different fields and attach it to any content type. Create a view to show this content "/node/%". Add required fields to view and this custom comments field. See the result. Try to customise this "comments" portion only..
naming convention for twig should be more explanatory/inclusive
Active
10.3 âš
theme system