Edgewall Software
Modify

Opened 18 years ago

Closed 17 years ago

Last modified 16 years ago

#3567 closed enhancement (fixed)

Link from Images to wikipages

Reported by: anonymous Owned by: Christian Boos
Priority: normal Milestone: 0.11
Component: wiki system Version: 0.9.6
Severity: minor Keywords: image macro
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

I want to link from an image, that is attached in a wikipage, and displayed at this wikipage to another wiki page.

WikipageOne: people (There are some images from persons) ⇒ If you click on an image from one person i want to see the special page from this person.

Is their any option in the WikiFormatting or any Macro for that?

Attachments (0)

Change History (7)

comment:1 by sid, 17 years ago

You could extend the [[Image]] macro (see WikiMacros).

Or as a hack, either of these should work:

  1. This code:
    {{{
    #!html
    <a href="http://www.python.org/">
    }}}
    [[Image(source:trunk/htdocs/python.png, nolink)]]
    {{{
    #!html
    </a>
    }}}
    
    will render as:

source:trunk/htdocs/python.png

  1. Or easier, use this:
    {{{
    #!html
    <a href="http://www.python.org/">
    <img src="/browser/trunk/htdocs/python.png?format=raw" alt="source:trunk/htdocs/python.png" title="source:trunk/htdocs/python.png" />
    </a>
    }}}
    
    Which renders as: source:trunk/htdocs/python.png

comment:2 by Matthew Good, 17 years ago

I find it easier to embed small amounts of HTML like this:

[[html(<a href="http://www.python.org/">)]]
[[Image(source:trunk/htdocs/python.png, nolink)]]
[[html(</a>)]]

source:trunk/htdocs/python.png

comment:3 by Christian Boos, 17 years ago

Component: generalwiki
Keywords: image macro added
Milestone: 0.11

See also this comment in #2048, as the above trick is no longer working in 0.11…

So for solving the original issue (Link from Images to wikipages), adding a link=<target> argument to the Image macro seems to be a good solution (where <target> is an arbitrary TracLinks).

comment:4 by Christian Boos, 17 years ago

Owner: changed from Jonas Borgström to Christian Boos

#2313 was marked as duplicate.

comment:5 by Christian Boos, 17 years ago

Resolution: fixed
Status: newclosed
Type: taskenhancement

Implemented in r4797.

comment:6 by trac@…, 16 years ago

This additional functionality needs to be documented in MacroList.

comment:7 by osimons, 16 years ago

Actually it is. My 0.11dev Image macro prints out these new/changed lines:

  • link=some TracLinks... replaces the link to the image source by the one specified using a TracLinks. If no value is specified, the link is simply removed.
  • nolink means without link to image source (deprecated, use link=)

You won't see this on the main Trac site docs as it is still running 0.10.x. - with an old version of Image macro.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Christian Boos.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Christian Boos to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.