Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#16 2020-09-27 15:55:19

etc
Developer
Registered: 2010-11-11
Posts: 5,689
Website GitHub

Re: Hidden Section for PP and Terms of Service in Footer

Destry wrote #326128:

It works. Pretty neat.

Ah, that’s great!

But how can I change it so it doesn’t output the heading tags like this:
<li><h2>link</h2></li>?

I would prefer just <li>link</li>.

Unwrap the links from <#>...</#> which represent the matched tags name (h2 etc).

I don’t have any h3 headings, so no nested lists are needed in my case. But I can imagine other situations maybe having those, or lower levels, in which case someone might want nested list output. I think that’s how soo.toc works; changes heading elements to list items and nests them in the contents according to section levels.

Yes, soo_toc certainly has more TOC-related features than a general-purpose plugin. Probably one can do it with etc_query, but this would need some more involved XPath. But you also could just style headings differently, depending on their levels, to mimic nested lists.

Offline

Board footer

Powered by FluxBB