- Issue created by @jandewit6
- 🇮🇳India prashant.c Dharamshala
@jandewit6
Could you please provide us with some examples of your requirement? - 🇳🇱Netherlands jandewit6
In the text below, I include H4 elements.
Question: in a View, how could I show the H4 text only and omit the []text?
Paragraph 1
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean ultricies vel massa vel congue. Cras dignissim, felis eu sollicitudin finibus, libero est ultrices tortor, ac vulputate ante ipsum sit amet risus. Nam magna ipsum, sagittis euismod dui vel, ultricies sodales augue. Cras elementum sit amet sapien sit amet tincidunt.
Paragraph 2
Vestibulum volutpat rutrum consectetur. In blandit non felis ut facilisis. Donec tempor tellus at sodales rutrum. Fusce vitae tincidunt ex. Curabitur ut porttitor felis. Cras ornare sem vel leo commodo lobortis.
Paragraph 3
Phasellus viverra nunc eu malesuada malesuada. Maecenas sollicitudin quis augue id placerat. Morbi sit amet tellus vitae neque pellentesque vulputate. Mauris tortor enim, dictum eu libero sit amet, dictum dignissim mauris. Integer euismod in nulla quis malesuada. Donec posuere felis eget sapien tempus posuere. Proin non orci a neque commodo dictum ut vel purus.
- 🇳🇱Netherlands jandewit6
Just found out that there are modules for my use case: https://www.drupal.org/project/table_of_contents →
Although I prefer the Views approach and be completely independent of modules, for now I implemented this toc module.
Any thoughts on the Views approach still appreciated!
- Status changed to Closed: works as designed
over 1 year ago 6:02am 16 May 2023 - 🇳🇱Netherlands Lendude Amsterdam
Views only really works well with structured fields. So if you would use Paragraphs for these blocks of text and the title text is in a different field than the block text, that could work, (so in this example it would be 3 Paragraph items with 2 fields each).
Doing invasive rewriting will get really messy really quickly in my experience (if it works at all).
Using that module seems like the right way of doing things here.
- 🇳🇱Netherlands jandewit6
Thanks.
I agree on the structuring of fields. However, in working with volunteers who work quite unstructured, one has to come up with solutions.The mentioned module (there is a module for that!) has the problem of messing with layout builder.
Anyhow, works for now.