プロジェクト

全般

プロフィール

Vote #75387

未完了

Easier anchor linking / Textile anchor links

Admin Redmine さんが約2年前に追加. 約2年前に更新.

ステータス:
New
優先度:
通常
担当者:
-
カテゴリ:
Text formatting_26
対象バージョン:
-
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
26
version_id:
0
issue_org_id:
17455
author_id:
92168
assigned_to_id:
0
comments:
6
status_id:
1
tracker_id:
2
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[New]

説明

I would like to be able to link to other sections of the current page more easily.

Currently, this requires linking to the page and adding the hashtag for the anchor name by substituting spaces for dashes and whatnot.

An example I just set up on a fresh copy of Redmine 2.5.2 for the default wiki page:


h1. Wiki

See [[wiki#Helpful-links|Helpful links]]

{{macro_list}}

h2. Helpful links

[[wiki#Wiki|Back to top]]

This style of linking can get quite unwieldy for longer page names and header names. It's also not possible to preview this style of linking in an external Textile-aware editor, so if I'm away from the Redmine installation (internal network), I can't get a rough idea of how the document will look and work.

At least the headers can be given shorter links by the (#ID) tag. But there's no shortcut for just linking to an anchor appearing on the same page, unless I'm missing something, so the best it can currently be is this:


h1(#top). Wiki

See [[wiki#Links|Helpful links]]

{{macro_list}}

h2(#Links). Helpful links

[[wiki#top|Back to top]]

If this were a wiki named "Extremely Long and Descriptive Wiki Name", and the section header were so long that even the custom shortened one is something like (#ChapterSectionSubsectionItem) , the linking process looks like this:

See also [[Extremely_Long_and_Descriptive_Wiki_Name#ChapterSectionSubsectionItem|something]]
or [[Extremely_Long_and_Descriptive_Wiki_Name#AnotherChapterSectionSubsectionItem|something else]]

As you can imagine, for a larger document with much cross-referencing (see this message, see that message, jump back to such and such message) it gets tedious and almost unmaintainable. What if the wiki page gets renamed?

There is a syntax in textile for linking to anchors on the current page, but currently doesn't work in Redmine:

"Helpful text":#AnchorID

This would yield a much simpler same-page linking style, compatible with external Textile editing/previewing (aside from the use of any Redmine-specific macros or links of course)

e.g.


h1(#top). Wiki

See "Helpful links":#Links

{{macro_list}}

h2(#Links). Helpful links

"Back to top":#top

or

See also "something":#ChapterSectionSubsectionItem
or "something else":#AnotherChapterSectionSubsectionItem


journals

--------------------------------------------------------------------------------
Note that this *used* to work back in 2.6.

It appears to have been broken in commit:4f2c5a9945d0a1d83620f5cfb7eb8d19056edc34
https://github.com/redmine/redmine/commit/4f2c5a9945d0a1d83620f5cfb7eb8d19056edc34

There is now a plugin for this:

https://github.com/neopoly/redmine-support_direct_textile_classes_and_ids

This change breaks lots of pages on my formerly 2.6 instance recently upgraded; I'm considering adding the plugin.
--------------------------------------------------------------------------------
I vote for marking it a Defect again.
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
You can use @[[#Helpful-links]]@ instead of @[[wiki#Helpful-links]]@ to link to a section in the current page since Redmine 4.0.
--------------------------------------------------------------------------------
Thats not totally what I would expect. @[[#Helpful-links]]@ displays @#Helpful-links@ as link text. I would expect to see @Helpful-links@.
Of cource I can write @[[#Helpful-links|Helpful-links]]@.
BTW there is no hint for this on the current wiki syntax page
--------------------------------------------------------------------------------


related_issues

relates,Closed,16313,Allow to link to an anchor of the current wikipage

Admin Redmine さんが約2年前に更新

  • カテゴリText formatting_26 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0