Jump from diagram to another section?

0 votes
asked Feb 25 in Question / help by Philipp Tuts
Hi,

I would like to jump from a activity-diagram activity to an anchor somewhere on the page.

Is this possible?

If so, want is the syntax?

Many thanks for your support,

regards,

Philipp
commented Feb 25 by Philipp
I should add, that I am working in an Atlassian Confluence wiki environment.

1 Answer

+1 vote
answered Feb 25 by The-Lu (21,320 points)

Hello P.,

- What kind of anchor?
- Which Confluence PlantUML Macro are you using?

If you want to add hyperlink on activity-diagram, you can read:

Here is a minimal example:

@startuml
start
[[http://plantuml.com]]:Some activity;
:Some [[http://plantuml.com link]];
end
@enduml


→ See link on PlantUML online server

If that can help,
Regards,
Th.

commented Feb 25 by Philipp
Hello Th.,

Thanks for your answer! Hyperlinks to other web pages are ok.

I am looking to links/anchors to the same page, e.g.

@startuml

:Activity\n[[#Section_3 jump down]];

@enduml

where "Section_3" is an anchor down the page somewhere, defined via the following macro

https://confluence.atlassian.com/conf79/anchors-1027128538.html

The link within the activity-diagram is then shown like

https://wiki.dlr.de/pages/viewpage.action?pageId=123456#Section_3

but the jump to this marked place is not done.

Do I do anything wrong here?

Many thanks again,

Philipp

P.S.: how do I create the nice blue-bordered grey background to my little example? :-)
commented Feb 25 by Martin (4,220 points)

Addressing your PS, because that's the only bit I can...

Th has used two different methods to get the grey shading look.

The text is in paragraph=formatted style

Like this text

The diagram is in 'quotations' mode:

Like this text

Also: The two methods combined gives this:

Like this text

Note that the editor is not WYSIWYG. 

commented Feb 25 by Martin (4,220 points)

I don't use confluence, so please excuse if this is gibberish.  But I notice in the macro description page that you referenced, that 

"The page name is repeated in the URL, after the # sign. The second occurrence of the page name is concatenated into a single word, with all spaces removed."

"If the page name contains special characters, where the URL displays a page ID rather than a name, the link to an anchor will look more like this http://myconfluence.com/pages/viewpage.action?pageId=54689987#Test-page1!-anchor 
In this example the page title is Test - Page 1! and the anchor name is anchor."

 You could try replacing "#Section_3" with "#PageTitle-Section_3" - for whatever PageTitle is.

commented Feb 25 by PhilippT (100 points)

Hi Martin,

Wonderful, this is the solution, it jumps now! laugh

Many thanks,

Philipp

commented Feb 26 by The-Lu (21,320 points)

Hello all,

Good news.

For other people using the "plantuml-for-confluence" Macro (https://marketplace.atlassian.com/apps/41025/plantuml-for-confluence)

Here is a mention of 'Confluence links' on the doc.:

The following list contains all different link notations that can be used inside Confluence:

  • [#anchor] 
  • [pagetitle]
  • [pagetitle#anchor]
  • [spacekey:pagetitle]
  • [spacekey:pagetitle#anchor]
  • [phrase@shortcut]

You can always pass a 'alias' that can be used as link text. To separate the URL from the alias use the pipe symbol '|'.

url for Space is [[FOO:Bar|This is the link text]]
url for Space is [This is the link text|FOO:Bar]

Standard links are enclosed by two brackets instead of Confluence links that are enclosed by only one bracket.

[Ref. https://avono-support.atlassian.net/wiki/spaces/PUML/pages/9699367/Macro+plantuml]

If that can help other people,
Regards,
Th.

...