Header ID Generator

Component ID

1836500

Component name

Header ID Generator

Component type

module

Maintenance status

Development status

Component security advisory coverage

covered

Downloads

1182

Component created

Component changed

Component body

Header ID Generator is a simple filter module which ensures, that each header in the content does have unique ID attribute and if does not, it creates one. This can be useful for linking to particular header in the content or for table of content (TOC) building. Some search engines can make use of that and build the TOC by themselves in the search results display. So this module could be used for SEO purposes too - see Osnovy: vybrané odkazy dovnitř dokumentu (in Czech).

If you are looking specifically for TOC tools check: TOC Filter or Table of Contents module.

Example

Before:

<h2>Header 1</h2>
<h3 id="h1">Header 2</h2>
<h3 id="h1">Header 3</h2>
<h2 id="header-4">Header 4</h2>

After:

<h2 id="h1">Header 1</h2>
<h3 id="h2">Header 2</h2>
<h3 id="h3">Header 3</h2>
<h2 id="header-4">Header 4</h2>

Credits