Footnotes



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
  • identical footnote texts can either be listed as one footnote or separately → see instructions of plugin settings

Screenshot of the Footnotes plugin's settings page

Installation

Either use the Craft Plugin Store or Composer.

composer require vierbeuter/craft-footnotes

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 %}

Issues

Feel free to create new issues like bug reports or feature requests at GitHub.

Known Issue

#7: I somehow broke the changelog parser of the Craft Plugin Store with release 2.2.0 and I don't know how to fix it. I tried to do so with releases 2.2.1 and 2.2.2 but that didn't work. Any help welcome, please write your comments on this in the GitHub issue.

Find the project's Changelog at GitHub: → Footnotes Changelog


Free

Package Name

To install this plugin, search for its package name on the Plugin Store and click “Install”.


Information

  • Version 2.2.2
  • Last Update 11/8/2019
  • Active Installs 20
  • Compatibility Craft 3
  • License MIT
  • Categories Templating, Fields

Report an issue