Code source wiki de Confluence bridge for Mockup
Modifié par Admin le 16/10/2025 - 23:33
Afficher les derniers auteurs
| author | version | line-number | content |
|---|---|---|---|
| 1 | = Description = | ||
| 2 | |||
| 3 | This is a bridge for the Confluence Balsamiq Mockup macro. It displays the image preview of the mockup, as it was migrated from Confluence. | ||
| 4 | The mockup preview is an attachment added to the parent page. For example, for a mockup identified with //MyMockupID//, there will be an attachment on the parent page of this form: //<balsamiq/mockup>_MyMockupID[_branchID].png//. This means that there should be a prefix called either **mockup** or **balsamiq**, followed by an underscore (**_**), then the resource identifier (**MyMockupID** in this case), then an arbitrary suffix (if it is set, by default it will be called **Master**). So, here are some filenames matching our example : | ||
| 5 | * //balsamiq_MyMockupID_Master.png// | ||
| 6 | * //balsamiq_MyMockupID.png// | ||
| 7 | * //mockup_MyMockupID.png// | ||
| 8 | |||
| 9 | = Parameters = | ||
| 10 | |||
| 11 | |=Parameter|=Description | ||
| 12 | |**Name**|The ressource ID that is part of the mockup filename attached to the current page (in the example above, it would be //MyMockupID//). | ||
| 13 | |**initialResourceID**|In case the Name parameter is not set, this is parameter will be taken into account for identifying the attachment representing the mockup preview. | ||
| 14 | |**initialBranchID**|The branch on which the file was stored. If it exists, by default, Confluence sets it to //Master//. | ||
| 15 | |||
| 16 | = Example of usage = | ||
| 17 | |||
| 18 | {{code}} | ||
| 19 | {{confluence_mockup initialResourceID="2278E287-509B-183B-1098-2EC38DDDB7D8" initialBranchID="Master"/}} | ||
| 20 | {{/code}} | ||
| 21 | |||
| 22 | This means that the accepted preview filenames attached to the current page are : | ||
| 23 | 1. //balsamiq_2278E287-509B-183B-1098-2EC38DDDB7D8_Master.png// | ||
| 24 | 1. //confluence_mockup_2278E287-509B-183B-1098-2EC38DDDB7D8_Master.png// | ||
| 25 | |||
| 26 | Filename number 1. has priority, so in case both files are attached to the current page, the first one is displayed. | ||
| 27 | |||
| 28 | = Result = | ||
| 29 | |||
| 30 | {{confluence_mockup initialResourceID="2278E287-509B-183B-1098-2EC38DDDB7D8" initialBranchID="Master"/}} |