Using anchor in a Wiki page

Description
dbrich
Posts: 2
Joined: Tue Apr 20, 2010 9:26 am

Using anchor in a Wiki page

Postby dbrich » Tue Apr 20, 2010 9:35 am

Hi,
I am new to Track & Wiki and try to create my first documents. I would like to add a link to a content on the same page, but cannot find any construct for it. The XWiki syntax knows an "anchor"-link, coded like this:
[#anchorname]
Also, all toc headers have automatically an anchor created. I tried to use this technique in my Wiki - the anchor definition is marked as a link in the text, but it does nothing if you click on it.
Is this not implemented in Track & Wiki?
Is there other way to do a link inside a page?

Thank you

chyliko
Posts: 26
Joined: Fri Sep 16, 2005 12:58 pm
Location: Prague, Czech Republic
Contact:

Re: Using anchor in a Wiki page

Postby chyliko » Wed Apr 21, 2010 12:51 pm

Hi,

all that you describe is part of Track & Wiki. Headings have an anchor associated automatically. The best way to find out their anchor name is to have {toc} generated and see, or you can inspect the page source. You'll note that the heading anchors are constructed from the heading text, having "H" as a prefix and a disambiguation suffix.

For example to

Code: Select all

1.1 My Heading


you can refer with

Code: Select all

[#HMyHeading].


To define your own anchor you can use the HTML syntax, one of:

Code: Select all

<a name="anchorname"></a>
<a id="anchorname"></a>
<span id="anchorname">Anchored text.</span>

Either of them can, but does not need to, have a text inside.

I am not sure whether there is also any wiki-like syntax or whether one way is better than another, but these all work in Track & Wiki.

Best regards,
Ondrej
___________________________
Ondrej Chylik, Polarion Software

dbrich
Posts: 2
Joined: Tue Apr 20, 2010 9:26 am

Re: Using anchor in a Wiki page

Postby dbrich » Sat Apr 24, 2010 7:58 am

Hi Ondrej,

thank you very much - that seems to work!
But is there a possibility to link a page and a header at the same time - like this: [my link>otherpage#HMyHeader] ?
This gets me just to the page, but not to the required header.

You are also mentioning one can check the generated page source - where do I find it?

thank you
Richard

chyliko
Posts: 26
Joined: Fri Sep 16, 2005 12:58 pm
Location: Prague, Czech Republic
Contact:

Re: Using anchor in a Wiki page

Postby chyliko » Tue Apr 27, 2010 4:44 pm

Hi Richard,

seems linking to an anchor on another page is not supported in the current version. The #HMyHeader part from your example is silently dropped. I forwarded this to our development team as a defect report. Thank you for the information.

By checking the generated page source I meant using right-click and "show source" or "show frame source" in the browser. There you can search for the text of your heading (like "My Header") to see which anchor name it maps to. Checking the target URL of a TOC entry might be more straightforward, though, if you have a {toc} on your page.

Regards,
Ondrej
___________________________

Ondrej Chylik, Polarion Software


Return to “Polarion Application Lifecycle Management (ALM)”

Who is online

Users browsing this forum: martinka69, Patrickariva and 20 guests