Intra-document links to XWiki headers in 1.0B3
I really like the WYSIWYG editor's "Add/edit link" feature. One problem, though, is XWiki headings. There are two problems generally: first, it isn't intuitive how to name the link. For example, for a level-2 XWiki heading (1.1 in Wiki markup, generates HTML h3 element of class "heading-1-1") named Styles, the fragment identifier was "HStyles". Also, a level-1 (h2, class "heading-1") was also named by prepending an "H" to the heading text. Is this the way it's supposed to work, where in the "link" field I have to put "Hsomething" for a link to a heading called "something", unless there's another heading with that same text, which could be added after I compose that link and then what do I do...? The other is that following the link causes the page to scroll to just below the heading text, which is a bit confusing. brain[sic]
On May 15, 2007, at 11:30 PM, THOMAS, BRIAN M (ATTSI) wrote:
I really like the WYSIWYG editor's "Add/edit link" feature. One problem, though, is XWiki headings. There are two problems generally: first, it isn't intuitive how to name the link. For example, for a level-2 XWiki heading (1.1 in Wiki markup, generates HTML h3 element of class "heading-1-1") named Styles, the fragment identifier was "HStyles". Also, a level-1 (h2, class "heading-1") was also named by prepending an "H" to the heading text. Is this the way it's supposed to work, where in the "link" field I have to put "Hsomething" for a link to a heading called "something", unless there's another heading with that same text, which could be added after I compose that link and then what do I do...?
The other is that following the link causes the page to scroll to just below the heading text, which is a bit confusing.
I've also noticed that point. The anchor should be done just before the section, not just after. JIRA and patches are most welcome. Thanks -Vincent
I'll be happy to post a JIRA on that, though patching it is not something I have time or skill to attempt at the moment. I know that a scrollto method exists that can subtract the height of the heading from the anchor's Y-coordinate, and I have made it work both in Firefox and IE, but of course I can put that in the request in case it helps the patcher. That leaves still my main question, however: is there a scheme for reliably composing an intra-document link to an XWiki heading? I don't consider it a show-stopper, so if you can't reply immediately I can post another issue. Indeed, it really is a bug/feature request to a) have the anchors named predictably and/or b) enhance the already too-cool-for-words link editor popup to list headings (and other anchors...?) existing on the page and format the link behind the scenes. I realize this could be done immediately only for the current page, but hey, that's all Ineed right now...:> brain[sic] ________________________________ From: Vincent Massol [mailto:[email protected]] Sent: Wednesday, May 16, 2007 6:33 AM To: [email protected] Subject: Re: [xwiki-users] Intra-document links to XWiki headers in 1.0B3 On May 15, 2007, at 11:30 PM, THOMAS, BRIAN M (ATTSI) wrote: I really like the WYSIWYG editor's "Add/edit link" feature. One problem, though, is XWiki headings. There are two problems generally: first, it isn't intuitive how to name the link. For example, for a level-2 XWiki heading (1.1 in Wiki markup, generates HTML h3 element of class "heading-1-1") named Styles, the fragment identifier was "HStyles". Also, a level-1 (h2, class "heading-1") was also named by prepending an "H" to the heading text. Is this the way it's supposed to work, where in the "link" field I have to put "Hsomething" for a link to a heading called "something", unless there's another heading with that same text, which could be added after I compose that link and then what do I do...? The other is that following the link causes the page to scroll to just below the heading text, which is a bit confusing. I've also noticed that point. The anchor should be done just before the section, not just after. JIRA and patches are most welcome. Thanks -Vincent
Hi, I'd say that right now you can more or less reliably name your internal link like this: Say you have: 1.1.1 I am a cool subtitle You can link to it using [Whatever>#HIamacoolsubtitle] (note that there is no space). As a general rule the anchor name is #HSubtitlewithoutspaces (though I've no idea what happens if 2 anchors have the same name). This will take you to Spacename/PageName#HIamacoolsubtitle , which hopefully is where you want to be. I think your issue goes further than this, but this is a start... Guillaume On 16/05/07, THOMAS, BRIAN M (ATTSI) <[email protected]> wrote:
I'll be happy to post a JIRA on that, though patching it is not something I have time or skill to attempt at the moment. I know that a scrollto method exists that can subtract the height of the heading from the anchor's Y-coordinate, and I have made it work both in Firefox and IE, but of course I can put that in the request in case it helps the patcher.
That leaves still my main question, however: is there a scheme for reliably composing an intra-document link to an XWiki heading?
I don't consider it a show-stopper, so if you can't reply immediately I can post another issue. Indeed, it really is a bug/feature request to a) have the anchors named predictably and/or b) enhance the already too-cool-for-words link editor popup to list headings (and other anchors...?) existing on the page and format the link behind the scenes. I realize this could be done immediately only for the current page, but hey, that's all Ineed right now...:>
brain[sic]
------------------------------ *From:* Vincent Massol [mailto:[email protected]] *Sent:* Wednesday, May 16, 2007 6:33 AM *To:* [email protected] *Subject:* Re: [xwiki-users] Intra-document links to XWiki headers in 1.0B3
On May 15, 2007, at 11:30 PM, THOMAS, BRIAN M (ATTSI) wrote:
I really like the WYSIWYG editor's "Add/edit link" feature. One problem, though, is XWiki headings. There are two problems generally: first, it isn't intuitive how to name the link. For example, for a level-2 XWiki heading (1.1 in Wiki markup, generates HTML h3 element of class "heading-1-1") named Styles, the fragment identifier was "HStyles". Also, a level-1 (h2, class "heading-1") was also named by prepending an "H" to the heading text. Is this the way it's supposed to work, where in the "link" field I have to put "Hsomething" for a link to a heading called "something", unless there's another heading with that same text, which could be added after I compose that link and then what do I do...?
The other is that following the link causes the page to scroll to just below the heading text, which is a bit confusing.
I've also noticed that point. The anchor should be done just before the section, not just after. JIRA and patches are most welcome.
Thanks -Vincent
-- You receive this message as a subscriber of the [email protected] list. To unsubscribe: mailto:[email protected] For general help: mailto:[email protected]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Yes, that's precisely what I did, but of course, only after inspecting the HTML source. You do bring up a helpful point I hadn't noticed, in that compressing the spaces out is required. Of course, this isn't something I'd want to have to tell a non-technical user, and disambiguating duplicated headings isn't as unrealistic a problem as it might seem, since several subsections might all be organized on a common template. Of course, just jumping to the (far-more-likely-to-be-unambiguous) section header might not be too onerous under such circumstances, so it might be okay just to discourage such a practice. Nevertheless, I love JIRA, so here we go... brain[sic] ________________________________ From: [email protected] [mailto:[email protected]] On Behalf Of Guillaume Lerouge Sent: Wednesday, May 16, 2007 11:34 AM To: [email protected] Subject: Re: [xwiki-users] Intra-document links to XWiki headers in 1.0B3 Hi, I'd say that right now you can more or less reliably name your internal link like this: Say you have: 1.1.1 I am a cool subtitle You can link to it using [Whatever>#HIamacoolsubtitle] (note that there is no space). As a general rule the anchor name is #HSubtitlewithoutspaces (though I've no idea what happens if 2 anchors have the same name). This will take you to Spacename/PageName#HIamacoolsubtitle , which hopefully is where you want to be. I think your issue goes further than this, but this is a start... Guillaume On 16/05/07, THOMAS, BRIAN M (ATTSI) < [email protected] <mailto:[email protected]> > wrote: I'll be happy to post a JIRA on that, though patching it is not something I have time or skill to attempt at the moment. I know that a scrollto method exists that can subtract the height of the heading from the anchor's Y-coordinate, and I have made it work both in Firefox and IE, but of course I can put that in the request in case it helps the patcher. That leaves still my main question, however: is there a scheme for reliably composing an intra-document link to an XWiki heading? I don't consider it a show-stopper, so if you can't reply immediately I can post another issue. Indeed, it really is a bug/feature request to a) have the anchors named predictably and/or b) enhance the already too-cool-for-words link editor popup to list headings (and other anchors...?) existing on the page and format the link behind the scenes. I realize this could be done immediately only for the current page, but hey, that's all Ineed right now...:> brain[sic] ________________________________ From: Vincent Massol [mailto:[email protected]] Sent: Wednesday, May 16, 2007 6:33 AM To: [email protected] Subject: Re: [xwiki-users] Intra-document links to XWiki headers in 1.0B3 On May 15, 2007, at 11:30 PM, THOMAS, BRIAN M (ATTSI) wrote: I really like the WYSIWYG editor's "Add/edit link" feature. One problem, though, is XWiki headings. There are two problems generally: first, it isn't intuitive how to name the link. For example, for a level-2 XWiki heading (1.1 in Wiki markup, generates HTML h3 element of class "heading-1-1") named Styles, the fragment identifier was "HStyles". Also, a level-1 (h2, class "heading-1") was also named by prepending an "H" to the heading text. Is this the way it's supposed to work, where in the "link" field I have to put "Hsomething" for a link to a heading called "something", unless there's another heading with that same text, which could be added after I compose that link and then what do I do...? The other is that following the link causes the page to scroll to just below the heading text, which is a bit confusing. I've also noticed that point. The anchor should be done just before the section, not just after. JIRA and patches are most welcome. Thanks -Vincent -- You receive this message as a subscriber of the [email protected] mailing list. To unsubscribe: mailto: [email protected] For general help: mailto: [email protected] <mailto:[email protected]> ?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws -- http://wikibc.blogspot.com/
I found the answer to the question of duplicate headings: The Nth duplication is suffixed with -N. An existing link would therefore be broken if a header with identical text were added above it, thus changing its name. I think that's a bug; at least, I don't like it, and I can't think of a way to code around it. I thought of naming them according to their place in the header hierarchy, but that would be a move backward from position-independent naming. Since I'm going backwards anyway, I'll back up to considering what the requirement is for a truly robust link name. Primarily, this would be that it won't change relative to the link, regardless of what happens to the page's source content, including changing the heading text... Okay, that's ridiculous; I give up. Never mind... brain[sic] ________________________________ From: [email protected] [mailto:[email protected]] On Behalf Of Guillaume Lerouge Sent: Wednesday, May 16, 2007 11:34 AM To: [email protected] Subject: Re: [xwiki-users] Intra-document links to XWiki headers in 1.0B3 Hi, I'd say that right now you can more or less reliably name your internal link like this: Say you have: 1.1.1 I am a cool subtitle You can link to it using [Whatever>#HIamacoolsubtitle] (note that there is no space). As a general rule the anchor name is #HSubtitlewithoutspaces (though I've no idea what happens if 2 anchors have the same name). This will take you to Spacename/PageName#HIamacoolsubtitle , which hopefully is where you want to be. I think your issue goes further than this, but this is a start... Guillaume
participants (3)
-
Guillaume Lerouge -
THOMAS, BRIAN M (ATTSI) -
Vincent Massol