Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Plugins

Auto generate Table of Contents (TOC) | pointers and ideas are welcome!

Started by ryan pao 8 years ago · 2 replies · 1397 views
8 years ago

Hi all,
Here is what I'd like to accomplish:
I'm implementing a wiki like function using grav, letting multiple users contribute content.
here is the mock layout of the directories

contents/
├── 00.toc
└── 01.articles
├── article.1
├── article.2
├── article.3
├── article.4
└── article.5
1) grab H1 element accross all article directory
2) auto generate TOC in 00.toc page.

Q1. is plugins like Page Toc able to go accross directories?
Q2. OR should I go the page.collection way?

thanx

8 years ago

I'd start with page collections. You could do some variation of this using a plugin or pure Twig.

8 years ago

Thank you for the pointer.

Looking at the plug in I thought page collection was the way to go.

arigato.
ryan

Suggested topics

Topic Participants Replies Views Activity
Plugins · by Rene, 1 week ago
2 43 1 week ago
Plugins · by Xavier, 4 weeks ago
2 53 4 weeks ago
Plugins · by Luka Prinčič, 7 years ago
3 1179 1 month ago
Plugins · by Sebastian van de Meer, 1 month ago
1 47 1 month ago
Plugins · by PIERROT Alain, 2 months ago
3 72 2 months ago