A way to use html include with macro code inside.

Tobias Widner April 21, 2014

Hi All,

I would like to import one html file to a confluence wiki page, in which there are macro code lines (like a dropdown {expand}) as wiki markup. But it looks like, that the html include only includes the text and normal html tags but does not parse the macros. The numbers and the titles of the dropdowns are dynamically. The html file gets generated from a java program.
Inside the dropdowns I got some tables (which are getting displayed) but confluence does not parse the {flowchart} wiki markup macro which is also inside the expand macro.

I looked up on many sites and forums but I can't find a solution to display the flowcharts in another way, than with the markup {flowchart} macro or include them with an URL.

In Gliffy there is only an option to upload a specific file, but I want to get them over an URL and this at displaying the wiki page, because the html files with the flowchart macros inside get generated also in a java program.

My idea is the following:
I got one file to include with the whole html code. Inside this file there are also includes for the different flowcharts (or expands).

With a normal include the wiki does not parse the macro statements inside this one html file.

Any idea, if its possible to import a gliffy diagram (which is manually generated and not in any gliffy editor) or to import the html code, so that wiki markup gets parsed and also every each macro which is defined inside?

1 answer

0 votes
Davin Studer
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 21, 2014

Instead of icluding the content with the include-html macro you could actually create a wiki page with the content preformatted. Check out the WebDAV plugin(comes pre-installed) for Confluence. It's super slick. It maps Confluence to a filesystem layout so you can work with it just like you would with a file system. Each page has a directory with a corresponding name and inside the directory is a .txt file with the same name as the directory. The content of the .txt file is your page content. Any other documents inside the folder are page attachments. Any folders inside a folder would be child pages. Thus, any program that can write to a file system could write to Confluence. This way you could create the shell page and just write the html directly to the page. Below is an example of how it structures the filesystem and a screenshot of what it really looks like.

My page (folder)
|
| My page.txt (content)
| Blah.pdf (attachment)
|
| My sub page (folder)
|
| My sub page.txt (content)

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events