Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Can I display a flat table of contents using the first letter of the document name?

University glossary.png

I'm trying to replicate the above onto a Confluence page, with the content pulled from labels.  Here's the original webpage - https://www.anu.edu.au/directories/university-glossary

Is there any way to do it, or should I just forget about it and use a live search function instead, and get the user to start typing what they are looking for?

Thanks in advance,

Kathryn.

 

1 answer

Back in the early 2010s, I wrote a Confluence macro called azList which did just this.

Here's a video of it in action (though sadly no longer maintained):

https://www.youtube.com/watch?v=cElY-7mSwAs 

It was based on the following jquery plugin:

https://github.com/dvdsmpsn/azList

It should be trivial to convert into a user macro for use on Confluence Server.

It would be a wrapper which inserts the following around an unordered list:

<div class="azList">$body</div>

Then adds the following javascript&colon;

AJS.toInit(function($){
$.each($('.azList > ul'),function(index, value) {
$(this).attr('id', 'azList-'+index); // Add a unique id to each ul
$(this).azList();
});
});

 And a sprinkling of CSS:

.azListIndex li {
display: inline;
padding: 0.2em;
}
.azListIndex li a {
background: #f0f0f0;
border-bottom: 1px solid #ccc;
padding: 0.1em 0.3em;
text-decoration:none;
}
.azListIndex a:hover {
background: #dedede;
border-bottom:1px solid #000;
}
.azListInitial {
list-style-type: none;
font-size:1.4em;
padding-top:0.6em;
background:none;
} 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
7.3.1
TAGS
Community showcase
Published in Confluence

Announcing Team Calendars in Confluence Data Center

Hi Community! We're thrilled to share that Team Calendars for Confluence is now a built-in feature for Confluence Data Center releases 7.11 and beyond.  A long time favorite,  Team Cale...

187 views 0 6
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you