I am looking for a solution to show a specific image on almost every
wiki-page.
To do this I just want do add something like [[Image(everywhere.png)]]
to the wiki-pages.
But unfortunately this does not work.
It is not possible to define globally available images.
To solve this problem I created a Ticket with all images.
Then I added to the following string to the specific wiki-pages:
[[Image(/raw-attachment/ticket/546/everywhere.png)]]
Is there a possibility to make my "everywhere.png" globally available
so I do not need to specify a path?
Thank you in advance!
bejot22
...my trac's copy of WikiMacros says:-
The first argument is the file specification. The file specification may reference attachments in three ways:
module:id:file, where module can be either wiki or ticket, to refer to the attachment named file of the specified wiki page or ticket.
id:file: same as above, but id is either a ticket shorthand or a Wiki page name.
file to refer to a local attachment named 'file'. This only works from within that wiki page or a ticket.
...so I am guessing what you probably need is something like:
{{{
[[Image(wiki:MyWikiPage:everywhere.png)]]
}}}
~ mark c
thank you for your response.
I solved the problem through copying the file everywhere.png to
"/usr/local/lib/python2.7/dist-packages/Trac-0.12.2-py2.7.egg/trac/
htdocs" (in my case).
Now I was able to link like this: "[[Image(/chrome/common/
everywhere.png)]]".
Thanks again!
Sincerly yours
bejot22
> > bejot22- Zitierten Text ausblenden -
>
> - Zitierten Text anzeigen -
...and what happens when you next upgrade Trac? I'm not sure if your package manager would remove that file... If you use the `absolute` page attachment path then the image stays with the wiki data (especially if you need to move the data to a new server).
~ mark c
> --
> You received this message because you are subscribed to the
> Google Groups "Trac Users" group.
> To post to this group, send email to trac-...@googlegroups.com.
> To unsubscribe from this group, send email to
> trac-users+...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/trac-users?hl=en.
>
>
As Mark says, it is a bad idea to put files into the Trac egg. Instead
put the image in the project htdocs directory (ie. /path/to/
your_project/htdocs/), then you can reference it as:
[[Image(htdocs:everywhere.png)]]
:::simon
https://www.coderesort.com
http://trac-hacks.org/wiki/osimons