We want to write a user macro to style certain numbered lists with alpha characters. We need a macro rather than just forcing a level 2 list in the source code or creating a style because we also output our documents using K15t Scroll PDF Exporter. In PDF Exporter numbered list styles can be styled in the template, but only for the entire document. K15t tells us that the exporter will maintain styles set in a user macro. So ... we need a user macro to style a numbered list with lower alpha characters.
K15t sent the following as an example, but we don't know enough to change the #set area of the macro. Looks like this might be a timestamp macro? You see our problem. WE understand everything that comes after <style>.
## @noparams
#set ($timestamp = $action.dateFormatter.calendar.timeInMillis)
#set ($uniqueClass = "list-${timestamp}")
<style>
.${uniqueClass} ol {
list-style-type: lower-alpha !important;
}
</style>
<div class="${uniqueClass}">
$body
</div>
There is one overview site, which let you know more about user macros:
I've had some programming skills but no clue about velocity. I learnt velocity just by try and error and the API.
Confluence uses velocity as the script language. On the linked page, velocity is explained quite good.
In your case:
Hope this gives you a good overview. If you need any help, let me know.
Regards, Dominic
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.