I have added a paragraph in content type News. I want the fields on this paragraph in my custom home page in a loop. As The News Contents would be shown in a carousel in home page. I am new to drupal. Can anyone help me? I have tried using views. the content is rendered. but as the view has extra divs, the design breaks. Drupal 9 using twig.

Using semantics view, i can modify or add classes to the div. but i needed to get rid of the outer two divs i.e. from container and views-view.html.twig. As the carousel is out of the view. and the view is acting like a single carousel entity.

  • 1
    Does this answer your question? How can I remove the default generated <div> tags in view's result? Jan 16 at 9:36
  • Thanks for the link @PatrickKenny. I installed the module, but could not edit accordingly. So, as i am creating the theme too, i removed the div wrappers from the views-view and container and my problem is solved. Jan 16 at 10:38
  • Then you need to describe what you had trouble editing. Among the answers on that question, this one is probably the most helpful for your case. Jan 16 at 10:40
  • Yeah, sorry for being vague. But i wanted a solution without the views. I.e. getting the values of the custom fields of News Content in a paragraph block or a node. @PatrickKenny Jan 16 at 10:49
  • Ok, you can do this in Views in less than 5 minutes by stripping the tags, but you can also find a way to do it without Views. Jan 16 at 10:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.