The {lozenge} macro creates a lozenge button with optional link...
This macro creates a professional lozenge effect that's ideal for creating professional looking buttons or simply highlighting important information.
It's specifically designed to "break" and look ugly if you try and put too much content in to it (although you can change the width to accomodate more content if required). We've done this to ensure the content contained within the lozenge is concise and that in turn leads to an improved experience of people viewing your website.
If specified, clicking the lozenge will go to the specified link.
color
silver
The colour of the left portion of the lozenge as shown on the Colors tab.
arrow
none or blue
Defines which arrow to use on the left portion of the lozenge:
none (default if no "link" specified) - the arrow will not be displayed
blue (default if a link is specified) - a blue arrow will be displayed
green - a green arrow will be displayed
title
The title to show at the top of the main panel.
icon
The Wiki Notation for an attached image (no larger than 48x48 pixels) or even text if desired.
width
347px
The width of the entire lozenge in pixels or as a percentage. Specify auto to make the lozenge automatically stretch to fit it's contents.
The body of the macro should contain the summary text in Wiki Markup Editor. This can, for example, be used to place excerpts in to the lozenge using the excerpt-include macro.
You can choose from 9 colours for the left side of the lozenge and whether to show a blue, green or no arrow:
Color
No Arrow
Blue Arrow
Green Arrow
bronze
silver
gold
blue
cyan
green
purple
pink
red
This plug-in is available without cost for both commercial and non-commercial purposes. However, if you have found it to be useful, particularly within a commercial environment, please consider making a donation to the author. This will encourage continued development of this and other plug-ins, as well as speeding up the response for your latest maintenance request.
If you wish to donate, it can be done easily with a credit card or bank transfer using PayPal. No account sign-up is required for credit or debit card payments.
The {lozenge macro} is released under the BSD License.
This macro has been tested by Adaptavist with Confluence 1.4.1, 1.4.3, 1.4.4, 2.0, 2.1 and 2.1.2.
It is usually pre-installed with Builder accounts. To install it on your own Confluence installation, please see Content Formatting Macros
Adaptavist maintain a JIRA Project for tracking bug reports and feature requests for this macro. The currently reported items are shown below:
jiraissues: Could not download[ http://jira.adaptavist.com/secure/IssueNavigator.jspa?view=rss&pid=10080&component=10138&statusIds=1&statusIds=3&statusIds=4&statusIds=5&sorter/field=updated&sorter/order=DESC&tempMax=25&reset=true&decorator=none] : caused by : Circular redirect to 'http://jira.adaptavist.com:80/secure/IssueNavigator.jspa'
As you can see, the title is also linked so that browsers with JavaScript disabled can still follow the link. If you don't specify a title, that link will dissapear so browsers without JavaScript won't be able to follow the link. Always specify a title for linked lozenges!
You can choose a green arrow as follows:
{lozenge:icon=!bell.png!|link=lozenge macro|title=Click Me|arrow=green}This lozenge links
back to this page...{lozenge}
You can select from numerous colours as shown on the Colors tab at the top of this page, as shown with the aid of this handy quote from the film The Matrix:
{section}{column}
{lozenge:icon=!pill_blue.png!|title=Take the Blue Pill|color=blue}Wake up in your bed and
believe whatever you want to believe...{lozenge}
{column}{column}
{lozenge:icon=!pill_red.png!|title=Take the Red Pill|color=red}Stay in Wonderland and I show
you how deep the rabbit hole goes...{lozenge}
{column}{section}
Resulting in:
Take the Blue Pill Wake up in your bed and believe whatever you want to believe...
Take the Red Pill Stay in Wonderland and I show you how deep the rabbit hole goes...
The section macro and column macro are ideal for putting lozenges side by side as shown above. The lozenges default width is designed to allow two lozenges to be displayed side by side within the default Builder page width of 750px which fits nicely on an 800x600 screen.
Lozenge Width
By default, all lozenges are 347px wide. However, you can make them stretch to fit their content, such as this text which is taken from the 2005 Bulwer-Lytton Fiction Contest:
{lozenge:width=auto|icon=!compass.png!}It was high noon in the jungles of South India when I
began to recognize that if we didn't find water for our emus soon, it wouldn't be long before
we would be traveling by foot; and with the guerilla warriors fast on our heals, I was starting
to regret my decision to use poultry for transportation.{lozenge}
Resulting in:
It was high noon in the jungles of South India when I began to recognize that if we didn't find water for our emus soon, it wouldn't be long before we would be traveling by foot; and with the guerilla warriors fast on our heals, I was starting to regret my decision to use poultry for transportation.
You can also set a percentage width as follows:
{lozenge:width=70%}70% of available width.{lozenge}
Resulting in:
70% of available width.
Or you can set the width in pixels as follows:
{lozenge:width=200px}200 pixels{lozenge}
Resulting in:
200 pixels
Hints and Tips
The lozenge is a great way to provide attractive navigation to key areas on a site. Because it limits the amount of text you can put in, you are forced to think of a concise way of describing what the link goes to and this makes your site easier to use.
Frequently Asked Questions
Q
I've put in the name of an icon as shown in the example, but it's not appearing and I get an ugly error message...
A
You need to attach the icon to your page or provide a URL to an icon elsewhere - this macro doesn't contain the icons.
I get the nasty message to, but if I commit my changes (save) then the lozenge appears as advertised. However, a return to the "Edit" screen throws an "unable to render" null exception error.
It would be most helpful if you could post an issue to JIRA http://jira.adaptavist.com/browse/WEB listing the following details so that we can try and replicate the error at this end
Confluence version
Plugin version
JVM version
Tomcat/resin/websphere version
and a copy/paste of the exception that you are seeing
When linking a Lozenge to an outside link or attachment, the little green arrow appears and forces the icon expand beyond the borders of the lozenge. Can this be prevented, prehaps but not having the gree arrow display.
I use the loznege for a disclaimer on a set of pages, for this I created a disclaimer on a separate page which I included using (code)[include:disclaimer](code). Now I want to align the Lozenge in the center of the page. Is this possible?
Thanks.
Dear Adaptavist,
The Lozenge macro seems to work fine in a page, but if i get a notification by email of the page when it's changed, the images do not come through in the email.
Other normal/default confluence pages with images come through with all images intact though, but those images are gifs.
An admin of our wiki discovered this macro and fell in love with it. Only problem with it is it's not flexible enough... if you put too much text in it, you see the images repeating. So I had to make a clone of this as a user macro using HTML. It ended up looking like this:
Doesn't look quite as good maybe (can't figure out how to do the rounded corners on the right), but we can put as much text as we want inside and there won't be any image tiling/repetition. Here's the code if you want to try to recreate this on your wiki:
{yourmacroname:This is the bold heading part}The body is the rest of the message text.{yourmacroname}
Oh, I made lots of colors of this too. There's a separate macro for each color. If you want the images for the other colors email me at mbovett@gmail.com.
I get the nasty message to, but if I commit my changes (save) then the lozenge appears as advertised. However, a return to the "Edit" screen throws an "unable to render" null exception error.
It would be most helpful if you could post an issue to JIRA http://jira.adaptavist.com/browse/WEB listing the following details so that we can try and replicate the error at this end
How do I attach icons to my page?
I can't seem to get an exclamation mark
to render correctly when it is part of the
When linking a Lozenge to an outside link or attachment, the little green arrow appears and forces the icon expand beyond the borders of the lozenge. Can this be prevented, prehaps but not having the gree arrow display.
Not currently - please add a task to our issue tracker and we'll look to implement this in a future release.
The CSS for the Lozenges breaks when using the Clickr theme. Is this known? Is there a fix?
can i create a link to an external page in the title of the lozenge macro?
I use the loznege for a disclaimer on a set of pages, for this I created a disclaimer on a separate page which I included using (code)[include:disclaimer](code). Now I want to align the Lozenge in the center of the page. Is this possible?
Thanks.
Dear Adaptavist,
The Lozenge macro seems to work fine in a page, but if i get a notification by email of the page when it's changed, the images do not come through in the email.
Other normal/default confluence pages with images come through with all images intact though, but those images are gifs.
The Lozenge test page I made uses a PNG image.
Are you able to suggest anything?
kind regards,
Paul
An admin of our wiki discovered this macro and fell in love with it.
Only problem with it is it's not flexible enough... if you put too much text in it, you see the images repeating. So I had to make a clone of this as a user macro using HTML. It ended up looking like this:
Doesn't look quite as good maybe (can't figure out how to do the rounded corners on the right), but we can put as much text as we want inside and there won't be any image tiling/repetition. Here's the code if you want to try to recreate this on your wiki:
http://idisk.mac.com/mbovett-Public/lozengeclone.txt
Here's a zip file with the images:
http://idisk.mac.com/mbovett-Public/pill_blue.zip
The macro usage is:
{yourmacroname:This is the bold heading part}The body is the rest of the message text.{yourmacroname}Oh, I made lots of colors of this too. There's a separate macro for each color. If you want the images for the other colors email me at mbovett@gmail.com.