Categories: Renderer Plugins, Bundled plugin, 6.x, Renderers Reference
This renderer plugin automatically adds id="..."
attribute to your <h1>
-<h6>
headers.
This also adds a hidden link with an anchor icon that becomes visible when hovering over a header text like:
This plugin is bundled with b2evolution version 6.11.2+
Example
The header:
<h2>This is a title with Spécial Chârs</h2>
will be converted to the following:
<h2 id="this-is-a-title-with-special-chars" class="evo_auto_anchor_header">
This is a title with Spécial Chârs <a href="#this-is-a-title-with-special-chars" class="evo_auto_anchor_link">{anchor icon}</a>
</h2>`
BUT if the header already has an ID, as in <h2 id="custom-id">This is a title with Spécial Chârs</h2>
, then no new ID will be generated.
Usage
You can create Short Links with named anchor using the following syntax:
((#this-is-a-title-with-special-chars Test))
((item-slug#this-is-a-title-with-special-chars Test))
The Short Links plugin adds a button after each header with an attribute id="..."
for quickly inserting links to that header:
Plugin Priority
It is recommended to let this plugin run after all other plugins that may generate titles (e-g: Markdown Plugin).