Updating the “Plan Your Upgrade” feature

If your Confluence is blocked from accessing the Internet (e.g. for security reasons), the “Plan your upgrade” feature that’s built into Confluence will go out of date the moment a new iteration of Confluence is released. That’s bad if you are, you know, planning your upgrade.

The solution is to download a new version not of Confluence, but of the Confluence “Troubleshooting and Support” plugin. It’s free and you’ll find it on the Atlassian Marketplace here.

Once installed, don’t look for it under “Troubleshooting and Support tools” on the Confluence Admin screen (I know, right). Look for it under the Administration subsection in the left-hand menu between “Cache Management” and “License Details”:

Now you’ll be able to determine the next version of Confluence you should be upgrading to, and you’ll get step-by-step instructions on how to do it.

Tip: Atlassian support generally suggest that if you’re going to do a major version upgrade, first do an interim upgrade to the “*.0” version, e.g. v7.0. Just remember to upgrade quickly after that, especially if the interim version is subject to security vulnerabilities.

Jump around a page with Anchors

If you have a long page, introduce an anchor and then insert links further down the page so your users can jump back to the top. Insert the Anchor macro at the top of your page and give it a catchy name, like “top” 🙂

Now you can insert multiple “go to top” links further down the page. Configure them as follows:

Then click the Save button. Done.

TIP: You could even use this to jump to an anchor on a completely different page. Just insert the link in the “Link” field and add hashtag and name of anchor.

Customize Panels to Look Like Panelboxes

It’s hardly as convenient as a Panelbox (via the commercial “Advanced Panelboxes” plugin), but you can make a standard Confluence panel look quite a bit fancier. Here’s a gussied-up Confluence panel:

In this example, the following was done:

  • Changed the font in the header
  • Aligned the header text (center)
  • Styled the header text with shadows and text spacing
  • Gave the panel rounded corners

You’re going to need to edit your global or space stylesheet, though. (If you’re an admin, you can go to Look and Feel and then select Stylesheet.)

I found this on an Atlassian page and slightly tweaked it with different values (you can obviously do the same), then added it to the stylesheet of the space I was working on:

.panel, #content .panel {
-moz-border-radius: 7px;
-webkit-border-radius: 7px;
border-radius: 7px;
}

.panel .panelHeader {
font-family:calibri,helvetica,sans-serif;
font-size:13pt;
text-align: center;
text-shadow: 1px 1px 3px #404040;
font-weight:110%;
letter-spacing: 0.5x;
line-height: 1em;
padding: 10px 10px 10px;
margin-bottom: 0;
-moz-border-radius-topleft: 7px;
-moz-border-radius-topright: 7px;
-webkit-border-top-right-radius: 7px;
-webkit-border-top-left-radius: 7px;
border-top-right-radius: 7px;
border-top-left-radius: 7px;
}

So, once the stylesheet is done, you can from that point on either re-use an already customized panel, or start from scratch with a new panel. In the screenshot above, this is how I customized my panel:

You can keep different variants on a Personal Confluence page and then trot them out on other pages as needed.

NOTE: this will obviously become a bit of a chore (not to mention a source of colour-scheme inconsistencies, if not real design mishaps) if people other than yourself are also building Confluence pages.

Make Tables Less Meh

Just found a free macro for Confluence (roughly versions 6 to 7) called Enhanced Table Formatting that lets you style your tables. Use this macro only when creating a table from scratch, because anything you already formatted will be returned to default.

But if you’re going to start fresh with a new table, just put this macro on your page and create your table inside it. You’ll be able to style just about any element of the table, including cell backgrounds with Hex colours.

Fair warning: I haven’t tried it yet. But it’s free and I’m definitely going to play around with it asap. Here’s the link:

https://marketplace.atlassian.com/apps/1220950/enhanced-table-formatting-for-confluence?hosting=server&tab=overview

Hide file types in the Attachments Macro

Let’s say you’ve uploaded a bunch of work files to a Confluence page to create a new file library. But you also prettified the page with a few nice pictures. Trouble is, you don’t want the pics to be listed in your file library. You could reference the pictures from somewhere else, but come on, you don’t have all day. This is when you start filtering out what Atlassian’s “Attachments” macro displays.

If you go into edit mode and then edit the Attachments macro, you’ll see a “Filename patterns” field right at the top. If you want to make sure no pictures (e.g. PNGs, GIFs, JPGs, etc.) show up, then put this in the Filename patterns field:

.*xlsx,.*xls,.*doc,.*docx,.*ppt,.*pptx,.*pdf,.*txt,.*rtf

Maybe you have some additional formats for Visio files, CAD drawings, MS Project files, etc., but these in my experience will cover all the basics (in a Windows-dominated environment, at least).

PS – the “dot star extension” format is weird, I know. I’m used to “star dot extension”, but there you go.

Adding Stuff to the Confluence Footer

Customizing the Confluence footer requires you to use wiki markup. So when you want to insert hyperlinked text, for example, go to your Confluence General Configuration settings and find the “Sidebar, header and footer” section. Then, in the “footer” field, type in your hyperlinked text as follows:

[This is the clickable text|http://this-is-the-url.com]

Note the square brackets on either side, and the “pipe” (straight vertical line) symbol between the text and the hyperlink.

This will now be included in the footer on all of your Confluence pages.

Centering a div with text aligned to the left

If you run into the problem of putting a table in div and then getting all the text centred when you centre-align the div, the solution is to embed one div in another (or in my case, a “Div” macro inside an “Align” macro).

Then you centre the contents of the outer container, and left-align the contents of the inner container.

The result is that the table sits neatly in the centre of the page, but the text inside the table behaves in an orderly left-aligned manner.

The screenshot below shows how to do this while using the ALIGN (outer) and DIV (inner) macros that come with Adaptavist’s Content Formatting Macros for Confluence:

NB: You can obviously try with two nested DIV tags, but the above works best if you’re working inside a Panelbox.

Styling text that resists styling

Some Confluence elements, links in particular, are going to resist the application of inline styles to them. You can put them in a SPAN or DIV macro and go to town with inline styles, but they’ll bluntly refuse your attempts at textual decoration.

That’s when you have to do two things:

  • Find out what built-in Confluence CSS element governs them.
  • Create a new style just for those things in the Global Stylesheet.

In my case I had a teal Panelbox with a clickable table of contents in it, and the table of contents naturally inherited the default colour for links in my instance of Confluence.

You can install a code viewer in your browser that will let you see what exact CSS style governs the display of hyperlinks in Confluence, or you can Google it for a good long while, as I did. The answer is: “com-atlassian-confluence”.

So, into my Global Stylesheet went this:

com-atlassian-confluence .whitetoc ul li a { color: white; text-shadow: 1px 1px 6px #000000; font-family: Verdana, Helvetica, sans-serif; font-weight:140%;}

It’s fancier than it needs to be, but I like the results. The TOC is eye-catching now, which is important to guide the reader to where they want to go:

What I did after creating the style was to go to the panelbox with the teal background, wrap a DIV macro around the Table of Contents macro, and insert the following into the DIV’s “Style” field:

whitetoc

And now that’s my reusable solution for every time I want to change the colour of a link without changing the default link colour everywhere else in the wiki.

What to do when images don’t resize

When you set an embedded picture to “Original” size, it should resize depending on screen resolution, right? Well, this doesn’t work reliably in Internet Explorer 11. Internet Explorer and Confluence have never played nicely together (jumping toolbars in Edit mode, smudged-looking text, etc.), but this not-resizing problem came as a design disaster.

But after some panic, I found that there is a sort-of solution: it happens to JPGs, but less so with PNGs. Convert the image to PNG and it stands a better chance of resizing. Google Chrome, of course, never had any issues to begin with. This solution for IE won’t work every time, but it does help somewhat.

I’ve come across a few more obscure workarounds, which I haven’t gotten to work perfectly yet. But generally, with multi-column layouts, the most reliable alternative is to resize the pics and then to embed links in them to the full-sized versions of the pics.

How to Reorder Child Pages

The Page Tree and Children Display macros can be customised to display child pages in alphabetical or numerical order, or by creation or modified dates. They can also display your selected mode in ascending or descending order. But what if you just want to move a few pages around? That’s when you use Confluence’s Space Tools.

In the left-hand pane, click on Space Tools:

Now select Content Tools:

Finally, click the Reorder Pages tab:

Now you can drag and drop individual page entries. The change is immediate.