RE: RE: Embedding a code in wiki to jump from list or table of content to section?

Fal Al, modified 1 Year ago.

Embedding a code in wiki to jump from list or table of content to section?

New Member Posts: 11 Join Date: 3/31/24 Recent Posts

Dear Community

Thank you for your patience.

 

I have a question and maybe you could help me. I have been searching for an solution but got no results. :-(

 

1. It is about the wiki. I want to make a wiki with a table of contents.

So, and then i want that if you click for example on the 3 section in the list or table of contents that it jumps and lead you actually to the 3 section.

 

Example:

1.Introduction

2.Section1

3.Section2

4.Section 3

When clicking on Section3 , it jumps to section 3

.......................................

................................................

.......................................

Section 3:

 

 

 

I tried it with carole( would be better) and html but without succeding.

 

These are the syntax codes i tried to use.(Carole)

[[ItemName]]

Item name

Link to an item

[[ItemName|Named Item]]

Named Item

Named link to an internal item

[[#AnchorName]]

#AnchorName

Link to an anchor in the current item

[[#AnchorName|Named anchor]]

Named anchor

Link to a named anchor.

[[ItemName#AnchorName]]

ItemName#AnchorName

Link to an anchor in an internal item

[[ItemName/SubItem]]

ItemName/Subitem

Link to a sub-item of an internal item

[[../SiblingItem]]

../SiblingItem

Link to a sibling of the current item

[[/SubItem]]

/SubItem

Link to a sub-item

[[attachment:Filename.txt]]

Filename.txt

Link to a sub-item called Filename.txt. Note that this is for MoinMoin 1.x compatability and is deprecated in favour of the more convenient [[/SubItem]] syntax

 

 

 

Please do you have a solution? Maybe you got the right code and know how to use it.

 

Thanks very much.

 

 

Sincerely

Fady Almajdalawi

thumbnail
jenny james, modified 1 Year ago.

RE: Embedding a code in wiki to jump from list or table of content to section?

New Member Posts: 2 Join Date: 5/24/24 Recent Posts

 

Hi,

This is very simple, I am writing some code to your query and you can edit it as per your requirements.

First you should structure your content with HTML anchors.

<h1>Table of Contents</h1>
<ul>
  <li><a href="#introduction">Introduction</a></li>
  <li><a href="#section1">Section 1</a></li>
  <li><a href="#section2">Section 2</a></li>
  <li><a href="#section3">Section 3</a></li>
</ul>

<h2 id="introduction">Introduction</h2>
<p>Your introduction content goes here...</p>

<h2 id="section1">Section 1</h2>
<p>Your Section 1 content goes here...</p>

<h2 id="section2">Section 2</h2>
<p>Your Section 2 content goes here...</p>

<h2 id="section3">Section 3</h2>
<p>Your Section 3 content goes here...</p>

 

Link them with TOC (Table Of Content)-

<a href="#introduction">Introduction</a>

Set Headers with IDs-

<h2 id="introduction">Introduction</h2>

Each section header includes an id attribute that matches the href value in the table of contents.

And last, If your wiki platform supports Carole syntax or similar, you may need to adapt the solution accordingly. However, based on standard wiki practices, using HTML is the most straightforward and widely supported method.

 

Thanks

Fal Al, modified 12 Months ago.

RE: RE: Embedding a code in wiki to jump from list or table of content to section?

New Member Posts: 11 Join Date: 3/31/24 Recent Posts

Thank you very much Jenny

Community
Company
Feedback