Ticket #544 (new enhancement)

Opened 4 years ago

Last modified 1 year ago

Aliasing other trac links

Reported by: Guardian Assigned to: gotoh
Priority: normal Component: GeneralLinkSyntaxPlugin
Severity: normal Keywords: alias aliasing traclink
Cc: Trac Release: 0.9

Description

Would it be possible to use this plugin to alias other trac links ???

In the absence of a bibtex plugin, I defined:

[link]
names=reference
reference_url = http://www.some-where.org/wiki/References#%s

So that reference:001 points to the proper anchor in my References wiki page (anchors come from the headings).

However, I would have found it more convenient to do that:

[link]
names=reference
reference_url = [wiki:References#%s]

This is just an example but I'm pretty sure other useful ones can be used. Regards, Guardian

Attachments

Change History

07/28/06 09:50:58 changed by cboos

Interesting idea. As a side note (as the request was for 0.9), in Trac 0.10 with the help of the InterWiki feature, you could achieve this by setting the following entry in your InterMapTxt page:

names /yourprojectname/wiki/References#$1     # See $1 in References

(in reply to: ↑ description ; follow-ups: ↓ 3 ↓ 4 ) 07/28/06 10:33:08 changed by cboos

Replying to Guardian:

So that reference:001 points to the proper anchor in my References wiki page (anchors come from the headings).

Sorry, you wanted to use reference:001, not names:001, so the InterMapTxt entry should rather be:

reference /yourprojectname/wiki/References#$1     # See $1 in References

Note also that 0.10 allows you to specify explicitely the id for a heading, so you could write, e.g.

== Reference 001 == #001

in your References page.

(in reply to: ↑ 2 ) 07/29/06 14:20:18 changed by anonymous

Replying to cboos:

Thank you for the information, I'll definitely give it a try when I install 0.10

(in reply to: ↑ 2 ) 11/03/06 22:04:54 changed by anonymous

Replying to cboos:

Note also that 0.10 allows you to specify explicitely the id for a heading, so you could write, e.g.

== Reference 001 == #001

it does not work because #001 is viewed as a ticket trac link.

(follow-up: ↓ 6 ) 11/04/06 11:44:03 changed by cboos

(sorry, I tried to reply to this yesterday, but th's disk was full ;) )

So yes, the example is wrong. You can't have a fragment identifier starting with a number, it's in the spec.

One can actually even build cross-refs footnotes with this...


-> wiki source:

=== A brand new section === #sec1
This can be explained in more details^[#ref001 1]^.

===== [#sec1 1]. __Creating new sections, why and how__, by R.J Hacker ===== #ref001

-> renders as:

A brand new section

This can be explained in more details1.

1. Creating new sections, why and how, by R.J Hacker

So can this be closed, or is there still something that you think could be enhanced in the trac:InterWiki syntax?

(in reply to: ↑ 5 ) 11/04/06 14:52:55 changed by guardian

Replying to cboos:

One can actually even build cross-refs footnotes with this...

Nice usage example.

So can this be closed, or is there still something that you think could be enhanced in the trac:InterWiki syntax?

I don't know if the discussion belongs to this ticket, however when using trac:InterWiki, it could be nice to have the opportunity to control the default display of the link itself and not only the tooltip like GeneralLinkSyntaxPlugin allows to do: the reference:001 wiki syntax would generate a [001] link instead of a reference:001 link.

I don't know if such a feature would be usefull though since reference:001 clearly gives the nature of the information: this is a link to a reference document; which could be preferred.


Add/Change #544 (Aliasing other trac links)




Change Properties
Action