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

Need Assistance Creating an Alpha List Macro

Hello, all!

I am in need of an alpha list for my documentation in Confluence. I have tried creating a user macro to accomplish this. The macro is as follows:

## @Param Title:title=Tip|type=string|desc=Title
<div>
<ol style="list-style-type: upper-alpha;">
<li></li>
<li></li>
<li></li>
</ol>
</div>

The issue is that I cannot edit the list. It will show as follows:

A.
B.
C.

But I cannot put anything next to these...any ideas on how to make the list editable? Is there a better way to accomplish this?

1 answer

0 votes
Davin Studer Community Leader Aug 26, 2019

Try something like this. Then just put an ordered list into the body of the user macro.

Macro Body Processing:
Rendered

Template:

## @noparams

<style type="text/css">
/*<![CDATA[*/
div.alpha-list ol {list-style-type: upper-alpha;}
/*]]>*/
</style>

<div class="alpha-list">
$!body
</div>

Thanks for your response! I tried this and it took the body but did not have the list (ABC). In other words, in the macro body I put the following:

Alpha 

List 

Here 

Expected result:

A. Alpha

B. List

C. Here

Actual Result:

Alpha 

List 

Here 

Davin Studer Community Leader Aug 26, 2019

The problem is that you didn't put a list in the body of the macro. You put in multiple lines of text. Use the numbered list button in the toolbar to put a list into the body of the macro. It will look like a numbered list in the editor, but in view mode it will be an alpha list.

Hey, Davin! Thanks for your response! I tried what you said and it kind of worked...I used the numbered list but it rendered with a lowercase alpha list. Any thoughts?

Current macro:

## @noparams
<div>
<ol style="list-style-type: upper-alpha;">
$body
</ol>
</div>

Input into the body:

1. Alpha
2. List
3. Here

Expected Result:

A. Alpha
B. List
C. Here

Actual Result:

a. Alpha
b. List
c. Here

Actually, this doesn't seem to work. Once I open in the viewport, it goes back to a numbered list.

Bill Bailey Community Leader Aug 27, 2019

Looks like your macro code is not the one @Davin Studer  suggested. He has a CSS rule followed by a div tag with class. You then insert your text (in list format) inside the body of the macro (what the $body variable refers to).

But you may also need to write a tighter CSS rule.

The "easiest" way to do this to use the browser inspect function to look at what rules are actually controlling the styling of your text (and overwriting your rule). Often with Confluence you will have write a more specific set of class selectors to get the rule to work

Davin Studer Community Leader Aug 27, 2019

Using the macro code above that I provided it should look like this in edit mode ...

image.png

And this when the page is viewed.

image.png

Like Bill Bailey likes this

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Posted in Confluence

What do you think is the most *delightful* Confluence feature? Comment for a prize!

- Create your own custom emoji 🔥 - "Shake for Feedback" on mobile 📱 - An endless supply of GIFs via GIPHY 🤩 Is there anything quite as nice as a pleasant surprise? Comment below with what...

415 views 23 8
Join discussion

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