Plugin screenshot thumbnail 1/3
Plugin screenshot thumbnail 2/3
Plugin screenshot thumbnail 3/3

Animated GIF to demonstrate the Footnotes plugin for Craft CMS

About

This plugin adds a footnote button to Redactor fields. Also, it adds new filters and functions to your Twig templates. — In the end you get what the plugin's name already says: Footnotes.

Features

  • coexists with regular superscript texts that are not supposed to be footnotes
  • numbers referring to footnotes can be anchor links → see instructions of plugin settings in screenshot below or see the setting in action
  • identical footnote texts can either be listed as one footnote or separately → see instructions of plugin settings in screenshot below or see the setting in action

Screenshot of the Footnotes plugin's settings page

Implementing Twig templates

When "Enable anchor links" setting is off

{# render your Redactor field's contents while filtering all footnotes #}
{{ entry.textField | footnotes }}

{# render all collected footnotes #}
{% if footnotes_exist() %}
    <ul>
        {% for number, footnote in footnotes() %}
            <li>
                {{ number }} {{ footnote }}
            </li>
        {% endfor %}
    </ul>
{% endif %}

When "Enable anchor links" setting is on

{# render your Redactor field's contents while filtering all footnotes #}
{{ entry.textField | footnotes }}

{# render all collected footnotes #}
{% if footnotes_exist() %}
    <ul>
        {% for number, footnote in footnotes() %}
            <li id="footnote-{{ loop.index }}">
                {{ number | raw }} – {{ loop.index }} – {{ footnote }}
                <a href="#fnref:{{ loop.index }}">back</a>
            </li>
        {% endfor %}
    </ul>
{% endif %}
Installation Instructions

To install this plugin, copy the command above to your terminal.

Active Installs
123
Version
4.0.1
License
MIT
Compatibility
Craft 3, Craft 4
Last release
December 3, 2022
Activity (30 days)
0
Closed Issues
0
Open Issues
0
Merged PRs
0
Open PRs