Changes between Version 1 and Version 2 of TracLinks


Ignore:
Timestamp:
02/22/09 22:50:18 (16 years ago)
Author:
trac
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TracLinks

    v1 v2  
    1919Some examples:
    2020 * Tickets: '''!#1''' or '''!ticket:1'''
    21  * Ticket comments: '''!comment:ticket:1:2'''
     21 * Ticket comments: '''!comment:1:ticket:2'''
    2222 * Reports: '''!{1}''' or '''!report:1'''
    23  * Changesets: '''!r1''', '''![1]''', '''!changeset:1''' or (restricted) '''![1/trunk]''', '''!changeset:1/trunk''', '''![2:5/trunk]'''
    24  * Revision log: '''!r1:3''', '''![1:3]''' or '''!log:@1:3''', '''!log:trunk@1:3'''
    25  * Diffs (requires [milestone:0.10 0.10]): '''!diff:@1:3''', '''!diff:tags/trac-0.9.2/wiki-default//tags/trac-0.9.3/wiki-default''' or '''!diff:trunk/trac@3538//sandbox/vc-refactoring@3539'''
     23 * Changesets: '''!r1''', '''![1]''', '''!changeset:1''' or (restricted) '''![1/trunk]''', '''!changeset:1/trunk'''
     24 * Revision log: '''!r1:3''', '''![1:3]''' or '''!log:@1:3''', '''!log:trunk@1:3''', '''![2:5/trunk]'''
     25 * Diffs (requires [trac:milestone:0.10 0.10]): '''!diff:@1:3''', '''!diff:tags/trac-0.9.2/wiki-default//tags/trac-0.9.3/wiki-default''' or '''!diff:trunk/trac@3538//sandbox/vc-refactoring@3539'''
    2626 * Wiki pages: '''!CamelCase''' or '''!wiki:CamelCase'''
    2727 * Parent page: '''![..]'''
    2828 * Milestones: '''!milestone:1.0'''
    29  * Attachment: '''!attachment:ticket:944:attachment.1073.diff'''
     29 * Attachment: '''!attachment:example.tgz''' (for current page attachment), '''!attachment:attachment.1073.diff:ticket:944'''
     30(absolute path)
    3031 * Files: '''!source:trunk/COPYING'''
    3132 * A specific file revision: '''!source:/trunk/COPYING@200'''
     
    3334Display:
    3435 * Tickets: #1 or ticket:1
    35  * Ticket comments: comment:ticket:1:2
     36 * Ticket comments: comment:1:ticket:2
    3637 * Reports: {1} or report:1
    37  * Changesets: r1, [1], changeset:1, or (restricted) [1/trunk], changeset:1/trunk, [2:5/trunk]
    38  * Revision log: r1:3, [1:3] or log:@1:3, log:trunk@1:3
    39  * Diffs (requires [milestone:0.10 0.10]): diff:@20:30, diff:tags/trac-0.9.2/wiki-default//tags/trac-0.9.3/wiki-default or diff:trunk/trac@3538//sandbox/vc-refactoring/trac@3539
     38 * Changesets: r1, [1], changeset:1 or (restricted) [1/trunk], changeset:1/trunk
     39 * Revision log: r1:3, [1:3] or log:@1:3, log:trunk@1:3, [2:5/trunk]
     40 * Diffs (requires [milestone:0.10 0.10]): diff:@1:3, diff:tags/trac-0.9.2/wiki-default//tags/trac-0.9.3/wiki-default or diff:trunk/trac@3538//sandbox/vc-refactoring@3539
    4041 * Wiki pages: CamelCase or wiki:CamelCase
    41  * Parent page: '''[..]'''
     42 * Parent page: [..]
    4243 * Milestones: milestone:1.0
    43  * Attachment: attachment:ticket:944:attachment.1073.diff
     44 * Attachment: attachment:example.tgz (for current page attachment), attachment:attachment.1073.diff:ticket:944
     45(absolute path)
    4446 * Files: source:trunk/COPYING
    4547 * A specific file revision: source:/trunk/COPYING@200
     
    9294Hint: when you move your mouse over the title of a section, a '¶' character will be displayed. This is a link to that specific section and you can use this to copy the `#...` part inside a relative link to an anchor.
    9395
    94 To create a link to a SubWiki-page just use a '/':
     96To create a link to a [trac:SubWiki SubWiki]-page just use a '/':
    9597{{{
    9698 WikiPage/SubWikiPage or ./SubWikiPage
    9799}}}
    98100
    99 To link from a SubWiki page to a parent, simply use a '..':
     101To link from a [trac:SubWiki SubWiki] page to a parent, simply use a '..':
    100102{{{
    101103  [..]
    102104}}}
    103105
    104 To link from a SubWiki page to a sibling page, use a '../':
     106To link from a [trac:SubWiki SubWiki] page to a sibling page, use a '../':
    105107{{{
    106108  [../Sibling see next sibling]
     
    135137}}}
    136138
    137 Display: [../newticket newticket][[comment(FIXME that's the 0.10 syntax)]] [/ home]
     139Display: [/newticket newticket] [/ home]
    138140
    139141To link to another location on the server (outside the project), use the '//location' link syntax (''Changed in 0.11''):
     
    153155 * !attachment:'the file.txt' or
    154156 * !attachment:"the file.txt"
    155  * !attachment:"ticket:123:the file.txt"
     157 * !attachment:"the file.txt:ticket:123"
    156158
    157159=== Escaping Links ===
     
    185187The link syntax for attachments is as follows:
    186188 * !attachment:the_file.txt creates a link to the attachment the_file.txt of the current object
    187  * !attachment:wiki:MyPage:the_file.txt creates a link to the attachment the_file.txt of the !MyPage wiki page
    188  * !attachment:ticket:753:the_file.txt creates a link to the attachment the_file.txt of the ticket 753
     189 * !attachment:the_file.txt:wiki:MyPage creates a link to the attachment the_file.txt of the !MyPage wiki page
     190 * !attachment:the_file.txt:ticket:753 creates a link to the attachment the_file.txt of the ticket 753
     191
     192Note that the older way, putting the filename at the end, is still supported: !attachment:ticket:753:the_file.txt.
     193
     194If you'd like to create a direct link to the content of the attached file instead of a link to the attachment page, simply use `raw-attachment:` instead of `attachment:`.
     195
     196This can be useful for pointing directly to an HTML document, for example. Note that for this use case, you'd have to allow the web browser to render the content by setting `[attachment] render_unsafe_content = yes` (see TracIni#attachment-section). Caveat: only do that in environments for which you're 100% confident you can trust the people who are able to attach files, as otherwise this would open up your site to [wikipedia:Cross-site_scripting cross-site scripting] attacks.
     197
     198See also [#export:links].
     199
     200=== comment: links ===
     201
     202When you're inside a given tickets, you can simply write e.g. !comment:3 to link to the third change comment.
     203It's also possible to link to a comment of a specific ticket from anywhere using one of the following syntax:
     204 - !comment:3:ticket:123
     205 - !ticket:123#comment:3 (note that you can't write !#123#!comment:3!)
    189206
    190207=== query: links ===
     
    246263 * `export:/some/file@123` - get revision 123 of the specified file
    247264
    248 This can be very useful for displaying HTML documentation with correct stylesheets and images, in case that has been checked in the repository.
    249 
    250 If the path is to a directory in the repository instead of a specific file, the source browser will be used to display the directory (identical to the result of `source:/some/dir`.
     265This can be very useful for displaying XML or HTML documentation with correct stylesheets and images, in case that has been checked in into the repository. Note that for this use case, you'd have to allow the web browser to render the content by setting `[browser] render_unsafe_content = yes` (see TracIni#browser-section), otherwise Trac will force the files to be downloaded as attachments for security concerns.
     266
     267If the path is to a directory in the repository instead of a specific file, the source browser will be used to display the directory (identical to the result of `source:/some/dir`).
    251268
    252269==== log: links ====