I’m looking to replicate the display of the table of contents within this Apex forum post - specifically the website [https://fullsuitcase.com/american-road-trip-itinerary-colorado-utah-wyoming/]. All I can find in support is the theme Demo but this has pagination which I don’t want to have, again I want to replicate the website linked above.
Help would be appreciated!
Hi There,
The page you are referring to use the structure of TOC with customization. It is built using html tags made by the toc elements on the text tab of page editor. See this: https://screencast-o-matic.com/watch/cbjvQ9IVZv
Try the following:
<div class="x-toc custom-toc block">
<ul class="unstyled cf">
<li class="x-toc-item"><a href="#toc-content-1" title="Link Title Here 1" >✓ TOC Item 1</a></li>
<li class="x-toc-item"><a href="#toc-content-2" title="Link Title Here 1" >✓ TOC Item 2</a></li>
<li class="x-toc-item"><a href="#toc-content-3" title="Link Title Here 1" >✓ TOC Item 3</a></li>
<li class="x-toc-item"><a href="#toc-content-4" title="Link Title Here 1" >✓ TOC Item 4</a></li>
</ul>
</div>
[gap size="100px"]
<div id="toc-content-1">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
Why do we use it?
It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).
</div>
[gap size="100px"]
<div id="toc-content-2">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
Why do we use it?
It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).
</div>
[gap size="100px"]
<div id="toc-content-3">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
Why do we use it?
It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).
</div>
[gap size="100px"]
<div id="toc-content-4">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
Why do we use it?
It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).
</div>
For more customization and styling, please refer to this guide.
This is fantastic, thank you. If I wanted to align the TOC box left or right - how would I do that as well? The demo has type=“left” in the code but I can’t make that work and I must be adding the align left feature incorrectly somewhere.
Hi There,
Feel free to use developer tools to inspect element. Previous suggestion is a sample. This assume that you are familiar with the structure of HTML and CSS. See this: https://screencast-o-matic.com/watch/cbjw69Inzx
On this line: <div class="x-toc custom-toc block"> you can see that class block is there. You can replace it with left or right for it’s position.