cancel
Showing results for 
Search instead for 
Did you mean: 

is it possible to generate a table of content on a SAP community blog?

achab
Product and Topic Expert
Product and Topic Expert
827

Hello dear SAP community,

I created a blog which corresponds to product FAQs.

https://blogs.sap.com/2021/02/19/sap-analytics-cloud-predictive-planning-frequently-asked-questions

How to generate an automatic table of contents that list the questions at the start of the blog?

Thanks for the support!

Kind regards

Antoine

Accepted Solutions (1)

Accepted Solutions (1)

DominikTylczyn
Active Contributor

Hello antoine.chabert

I'm afraid that function is not available on SAP Blog. SAP Blog is based on Wordpress. Plain Wordpress doesn't provide table of contents function - there are quite a few articles on that. Instead it can be handled by a Wordpress plugin - see How to Create a Table of Contents in WordPress Posts and Pages

But you can't add Wordpress plugins to SAP Blog platform. So you'll have to play with HTML code of your blog along the lines of How to Add Table of Contents Easily in WordPress Without Plugin

That's not difficult but may be tedious if you have a lot of entries.

Best regards

Dominik Tylczynski

achab
Product and Topic Expert
Product and Topic Expert

Thanks for the immediate support Dominik and Roland - appreciated!

To be honest what a pain... Do you know by any chances if there are plans to improve this or whether an idea already exists in the influence page for SAP community? If not I'll search for it or create it in case it does not exist.

In my blog I do have 30+ links so going manual is not really an option. Tedious is the right word indeed.

Kind regards,

Antoine Chabert

mpern
Product and Topic Expert
Product and Topic Expert
0 Kudos

Just food for thought:

Do you really wan to continue using Wordpress, or any old-school CMS for that matter, given the "stellar" track record of Wordpress regarding security issues?

The editing capabilities of community.sap.com are severely lacking. No ToC, no auto-generated header links...

A plain old README.md on GitHub has more features and a better editing experience, for that matter.

And don't get me started on our Answers "feature". Please look at https://stackoverflow.com on how to get it right.

Sandra_Rossi
Active Contributor

Workaround: see my Javascript which generates the Table of Contents from H1/H2/H... tags

Answers (2)

Answers (2)

achab
Product and Topic Expert
Product and Topic Expert

I should always trust my self past :-). In case anyone is interested the idea was already submitted on the official improvement portal. Is it currently set as "Not Planned". I am sure additional votes would help this being re-considered. https://influence.sap.com/sap/ino/#/idea/138987. Kind regards, Antoine

Sergiu
Contributor

<a href="#lession1">Lession.1</a>
<a href="#lession2">Lession.2</a>
<a href="#lession3">Lession.3</a>
<a href="#lession4">Lession.4</a>
<h1><a id="lession1"></a>Introduction of Lession.1</h1>
This is sub topic.1

This is sub topic.2

This is sub topic.3

This is sub topic.4
<h1 id="lession2">Introduction of Lession.2</h1>
This is sub topic.1

This is sub topic.2

This is sub topic.3

This is sub topic.4
<h1 id="lession3">Introduction of Lession.3</h1>
This is sub topic.1

This is sub topic.2

This is sub topic.3

This is sub topic.4
<h1 id="lession4">Introduction of Lession.4</h1>
This is sub topic.1

This is sub topic.2

This is sub topic.3

This is sub topic.4