blog.lsonline.fr – Create a dynamic Table of Content for your SharePoint Wiki pages

Page Meta Tags

handheldfriendly True
viewport width=device-width, initial-scale=1.0
msapplication-tilecolor #363636
theme-color #ffffff
referrer no-referrer-when-downgrade
twitter:card summary_large_image
twitter:title Create a dynamic Table of Content for your SharePoint Wiki pages
twitter:description To facilitate the users experience and win in productivity, implement a dynamic and reusable TOC will help users to access directly to the targeted chapter
twitter:url https://blog.lsonline.fr/2018/12/23/create-a-dynamic-table-of-content-for-your-sharepoint-wiki-pages/
twitter:image https://blog.lsonline.fr/content/images/2018/12/LsOnline-SP-TOC-Post.JPG
twitter:label1 Written by
twitter:data1 Laurent Sittler
twitter:label2 Filed under
twitter:data2 SharePoint, SharePoint 2013, SharePoint 2016, SharePoint 2019, SharePoint Online, Classic Experience, JavaScript
twitter:site @laul0_68
twitter:creator @laul0_68
generator Ghost 3.37
google-site-verification bRHIlhlkC0vlrpSKmA7r2DRpxr4tEXl8nquVjNup7gA

Page Headers

0 HTTP/1.1 200 OK
Date Fri, 06 Nov 2020 05:54:44 GMT
Content-Type text/html; charset=utf-8
Connection close
Set-Cookie __cfduid=d931320f18c2f8fddc094563ae777356d1604642083; expires=Sun, 06-Dec-20 05:54:43 GMT; path=/; domain=.lsonline.fr; HttpOnly; SameSite=Lax; Secure
X-Powered-By Express
Cache-Control public, max-age=0
Vary Accept-Encoding
CF-Cache-Status DYNAMIC
cf-request-id 063db82c170000e1d6a6b1d000000001
Expect-CT max-age=604800, report-uri=”https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct”
Report-To {“endpoints”:[{“url”:”https:\/\/a.nel.cloudflare.com\/report?s=7s3hMhEm6LK9szt8w8vunoE3oIus0tZUUmMdffGmdVqbdsX0F1KdZi6RBHcGOYf3w8Q6INQhLlr4qWhMoqPIsCeQTSRq74XwqK6QHw%2FQ%2BnPf”}],”group”:”cf-nel”,”max_age”:604800}
NEL {“report_to”:”cf-nel”,”max_age”:604800}
Strict-Transport-Security max-age=2592000; includeSubDomains; preload
X-Content-Type-Options nosniff
Server cloudflare
CF-RAY 5edc8fc01f99e1d6-ORD

Keyword Frequency

quot 128
toc 62
counth 54
sharepoint 30
lt 26
gt 26
tagname 23
if 21
sp 21
add 19

Keyword Cloud

Create a dynamic Table of Content for your SharePoint Wiki pages Home Speaker Videos About Me Contact December bull min read Update add script to manage title from H second updated in accordance with feedback about browsers compatibility Since I explain my customers that is good idea capitalize all data and knowledge can help teams do this Let’s focus on the part will you why how implement TOC into This tutorial only works based classic experience If want Of modern created an other solution A SPFx Contents Extension Why implementing page One has dev team quickly adhered consists capitalizing guidances development Sometimes some guidance have lot points chapters make reading difficult especially when developer looking particular chapter Therefore at top allows reader go directly by clicking it It be really useful isn’t Even though does not provide kind feature easy How Page After creating inserting content insert embedded code To click tab ribbon Embed Code Insert Then following area Note deliberately added comments comprehension You remove them if necessary lt The Container most important thing note ID used CSS JavaScript gt ul id quot sp-toc style type text css padding px Add between border background-color f background color min-width minimal width like extensible display inline-block solid aaaaaa arround list-style none Remove default list li need custom text-decoration link underline class-toc-h currently first level supported padding-left indentation e greatter than previous one javascript main function build buildToc Init counters var countH DOMElement container retrieved toc document getElementById innerHTML nodesToc Builder Get HTML tags current obj getElementsByTagName tagList str Loop each tag i length indexOf tagName number multilevel lvl getNumberLevel template class getClassLvl href title- return else Multilevel generator Reset next Register after SP loaded spBodyOnLoadFunctionNames push Finally save enjoy update without changing anything reloaded every time several demands allow table support headers replace h ig Hoping post Online Classic Experience Laurent Sittler Microsoft Architect Consultant Learning sharing interests Modern Workplace Read More mdash LsOnline Favicon extension Oct Group People WebPart v Sep Configure Google Tag Manager Apr See posts Site Collection Error are facing error or more sites collections here PowerShell cmdlet unblock Dec Getting Started x s decided open blog Follow me Popular Tags Framework Patterns amp Practices Usefull Link Search Privacy Policy Terms Use copy All Rights Reserved