Moodle Plugins directory: Table of Contents Generator: Versions: 1 | Moodle.org
Table of Contents Generator
Filters ::: filter_toc
Maintained by
Ben Chenoweth
Automatically generated table of contents for a page of content.
Table of Contents Generator 1
Moodle 2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7, 2.8, 2.9, 3.0, 3.1, 3.2, 3.3, 3.4, 3.5, 3.6, 3.7, 3.8, 3.9, 3.10, 3.11, 4.0, 4.1, 4.2
Released: torsdag, 31. august 2023, 15:03
Table of Contents (TOC) Filter
2023 version
==============================
This version has been updated so that the plugin works with Moodle 4. Note that I am unable to test this version, so please be careful implementing this on a live site!
The Table of Contents filter scans pages for heading tags (like h1,
h2, etc) and automatically generates a nested list of these tags
as a table of contents. Each entry in the table is made into an
html link to the actual heading.
The plugin has both global and local settings.
GLOBAL SETTINGS
===============
* Headings: you can nominate which headings tags you want the filter
to look for (default: h1,h2,h3,h4)
* Search in divs: you can choose whether or not to look for headings
tags located inside divs (default: yes)
* Backlink: you can choose whether or not to include a backlink at
the end of the heading that links back to the TOC.
* TOC Title: you can nominate the title used in the TOC (default:
Table of Contents)
* TOC Title Heading Tag: you can choose which heading tag is used for
the TOC's title (default: 1)
LOCAL SETTINGS
==============
(The local settings allow you to override the global settings on a
per page basis.)
* Headings: you can nominate which headings tags you want the filter
to look for
* TOC Title: you can nominate the title used in the TOC
* TOC Title Heading Tag: you can choose which heading tag is used for
the TOC's title
HIDING INDIVIDUAL HEADINGS
==========================
You can also hide specific headings from the TOC by wrapping the heading
in a div with class="non-toc". For example,
LOCATION
========
By default, the location of the TOC is placed at the beginning of the
page. However, you can nominate a different position by putting the string
[contents]
where you want the TOC to appear.
CSS
===
CSS styling may be used to modify the appearance of the table. The entire
table is contained within a div with the 'toc' class. The backlinks have
the class 'toc_link' applied to them. For example,
/* Hide bullets in TOCs */
.toc ul {
list-style: none;
}
(Add to the custom CSS field of your moodle theme.)
2023 version
==============================
This version has been updated so that the plugin works with Moodle 4. Note that I am unable to test this version, so please be careful implementing this on a live site!
The Table of Contents filter scans pages for heading tags (like h1,
h2, etc) and automatically generates a nested list of these tags
as a table of contents. Each entry in the table is made into an
html link to the actual heading.
The plugin has both global and local settings.
GLOBAL SETTINGS
===============
* Headings: you can nominate which headings tags you want the filter
to look for (default: h1,h2,h3,h4)
* Search in divs: you can choose whether or not to look for headings
tags located inside divs (default: yes)
* Backlink: you can choose whether or not to include a backlink at
the end of the heading that links back to the TOC.
* TOC Title: you can nominate the title used in the TOC (default:
Table of Contents)
* TOC Title Heading Tag: you can choose which heading tag is used for
the TOC's title (default: 1)
LOCAL SETTINGS
==============
(The local settings allow you to override the global settings on a
per page basis.)
* Headings: you can nominate which headings tags you want the filter
to look for
* TOC Title: you can nominate the title used in the TOC
* TOC Title Heading Tag: you can choose which heading tag is used for
the TOC's title
HIDING INDIVIDUAL HEADINGS
==========================
You can also hide specific headings from the TOC by wrapping the heading
in a div with class="non-toc". For example,
Lesson 1 — Greco-Roman Civilisation
LOCATION
========
By default, the location of the TOC is placed at the beginning of the
page. However, you can nominate a different position by putting the string
[contents]
where you want the TOC to appear.
CSS
===
CSS styling may be used to modify the appearance of the table. The entire
table is contained within a div with the 'toc' class. The backlinks have
the class 'toc_link' applied to them. For example,
/* Hide bullets in TOCs */
.toc ul {
list-style: none;
}
(Add to the custom CSS field of your moodle theme.)
Version information
- Version build number
- 2023040100
- Version release name
- 1
- Maturity
- Stabil versjon
- MD5 Sum
- 8cbe1f7467a4a0c653b3f736fbe9f286
- Supported software
- Moodle 2.1, Moodle 2.2, Moodle 2.3, Moodle 2.4, Moodle 2.5, Moodle 2.6, Moodle 2.7, Moodle 2.8, Moodle 2.9, Moodle 3.0, Moodle 3.1, Moodle 3.2, Moodle 3.3, Moodle 3.4, Moodle 3.5, Moodle 3.6, Moodle 3.7, Moodle 3.8, Moodle 3.9, Moodle 3.10, Moodle 3.11, Moodle 4.0, Moodle 4.1, Moodle 4.2
- Latest release for Moodle 2.1
- Latest release for Moodle 2.2
- Latest release for Moodle 2.3
- Latest release for Moodle 2.4
- Latest release for Moodle 2.5
- Latest release for Moodle 2.6
- Latest release for Moodle 2.7
- Latest release for Moodle 2.8
- Latest release for Moodle 2.9
- Latest release for Moodle 3.0
- Latest release for Moodle 3.1
- Latest release for Moodle 3.2
- Latest release for Moodle 3.3
- Latest release for Moodle 3.4
- Latest release for Moodle 3.5
- Latest release for Moodle 3.6
- Latest release for Moodle 3.7
- Latest release for Moodle 3.8
- Latest release for Moodle 3.9
- Latest release for Moodle 3.10
- Latest release for Moodle 3.11
- Latest release for Moodle 4.0
- Latest release for Moodle 4.1
- Latest release for Moodle 4.2
Version control information
- Version control system (VCS)
- GIT
- VCS repository URL
Default installation instructions for plugins of the type Filters
- Make sure you have all the required versions.
- Download and unpack the filter plugin.
- Place the folder (eg "myfilter") in the "filter" subdirectory.
- Visit http://yoursite.com/admin to finish the installation