Hello community I am in need of litle help from you.
My intention is to have a page having an overview of headings, something like a small table of content, than bellow it it’s a toBlocks field. something like this
++++
Table of content
- A list of all h1 or h2 elements from textblock()->toBlocks()
++++
Content
What i want is to implement anchor links to every list element. The anchor link should be same like $heading but stripped of its h1 or h2 tags. But using $heading->escape() isn’t working for me.
The problem with the above is that $heading is a block item, so you have to get the field value from the block. Don’t know what fields you have in your block…