bannerd

Deconstructing Confluence

1. Overview

When SWEHB was built in 2010, a number of macros and plugins were used to add features to Confluence and SWEHB. Some give the SWEHB a unique look and feel. Others are used to reduce the initial cost of construction. Still others were used out of convenience of the developer. 

In the event that Confluence is not the wiki of choice in the future, some of these features may have to be implemented in a different way or eliminated altogether. This page contains a discussion of some features that were eliminated (and why), and some features that could be implemented in a different way (reducing the need for certain Confluence plug-ins and macros). 

2. Terms Macro

In the original SWEHB (space: 7150), there was a "term" macro in use. Terms were defined in a database structure using the reporting and scaffolding plugins. the "term" macro was put into SWEHB pages wherever a term was used. When the user hovered over the term, a Windows "tool-tip" popped up and contained a definition of the term from the term database. 

After a number of updates to Confluence and the plug-ins, the term macro no longer worked as originally designed. The macro was removed from SWEHB pages and the Terms Database was reduced to a static list of terms. 

2.1 Terms Database

In SWEHBVD, Terms Database is a static list of terms defined in a variety of documents referenced in SWEHB. 

3. SWEREFN Macro 

This macro was originally called SWEREF macro. It was written in the original SWEHB to aid the user in going to the Resources tab of the page where the References were listed. The SWEREF macro was added after a reference was mentioned in the body of the page. It appeared as a subscripted three digit number link. When clicked by the user, they would be taken to the Resources page of the SWEHB page. 

3.1 SWEREF to SWEREFN

After a number of updates to Confluence and the plug-ins, the term macro no longer worked as originally designed. The SWEREF macro was rewritten to function properly. All of the old SWEREF macros were changed to SWEREFN macros. 

3.2 SWEREFN Operation

This macro takes one parameter from its body - the 3 digit number corresponding to the SWEREF number of the reference. 

The macro is displayed as a superscripted, 3 digit number, link. When clicked the link takes the user to the Resources page. The location of the Resources page is either the default location (tab 5) or a unique location for the page defined by the use of a Set-Data macro where the variable name is "reftab" and the value in the body of the macro is the tab number for the Resources tab. 

Clicking the link changes the URL for the page by adding an anchor to the end of the URL. The anchor takes the user to the Resources tab containing the References. 

3.3 Living Without SWEREFN

A simple way to do away with SWEREFN would be to use the "tablink2" macro. This macro takes the user to a specific tab in the page. To implement: 

  1. Insert the tablink2 macro where you would the SWEREFN macro. 
  2. tablink2 takes 2 parameters: 
    1. Tab to go to - numeric based on the "tabs-#" in the target Div. Normally this is the Resources tab. 
    2. Link Text - text which will be used as the link. Normally this is the 3 digit SWEREF number. 
  3. Save the tablink2 and convert it to a superscript. 

When you save the page, you can click on the superscripted number and it will take you to the target tab. 

The advantage of using tablink2 is that it is not just a one time use like SWEREFN (there is a bug in SWEREFN that forces you to reload the page to reset the redirection). Users can go around to other tabs and click other tablink2 macros and get directed to different tabs without having to reload the page. 

4. References

References is a very complex implementation of several plug-ins and some other macros in Confluence. The References Table is in the 7150 space (it may be moved at some time to the SITE space). It uses the template called "reference"

For documentation see References in SWEHB

  • No labels