On Mon, Aug 16, 2010 at 10:20:16PM +0200, Fabian Noeldgen wrote: > Hi, > > On 08/16/2010 09:51 PM, Chris G wrote: > >E.g. if I upload the file image.png to<dokuwiki_home>/data/media > >directory what's the correct link to refer to it? > > if an image is saved in the root namespace, you can refer to it as > {{:image.png}} from every page. If it's in a namespace called abc, > refer to it as {{:abc:image.png}}. No matter where you move your > page. > Not on my dokuwiki! :-) I put *exactly* this on a page in my wiki, i.e. I entered '{{:image.png}}' on a page and the result was absolutely nothing. I.e. it didn't even show up as a missing link. You *can* refer to the file <dokuwiki_home>/data/media/wiki/dokuwiki-128.png as {{wiki:dokuwiki-128.png}} but if you copy the file to <dokuwiki_home>/data/media/dokuwiki-128.png then referring to it as {{:dokuwiki-128.png}} doesn't work. In addition for some reason non-existent .png files are ignored silently whereas non-existen .pdf files aren't ignore and the link is shown in red. Further experimenting, I have a file called exreglem-fr.pdf, I have copied it to <dokuwiki home>/data/media. If I put a link {{:exreglem-fr.pdf}} on a wiki page the link looks valid (it's not red) but when I click on it I just get a plain white page with just the words "Not found" displayed. If I import the file through the image importing mechanism in the editing page then I get a link that works! It's all very strange and inconsistent and confusing. > Btw, there is a plugin[0] which lets you move pages around without > breaking any links. > If you mean the pagemove plugin then I tried that for a while but came to the conclusion (like severla other people) that it broke more things than it fixed. > >I tried this and couldn't get it to work properly. There's no explanation > >in the > >dokuwiki documentation (that I can see anyway) that tells you how a > >{{<something>}} image link is actually interpreted. > > The namespaces[1] docs very precisely describe the grammar of a > link. If you feel that this should be expressed more clearly, feel > free to improve the "images" page[2]. It's a wiki. > But nowhere does it say that (for example) {{fred:image.png}} will be found (supposedly) in the <dokuwiki>/data/media/fred directory. > >For a start it appears in the browser address bar with _media rather than > >just media > >and then, in addition, it seems to add some/all of the namespace that > >the reference is from. > > Ah... That's internal foo. AFAIK _media belongs to some rewriting > for fetch.php. DokuWiki will take care of that, so you don't have > to. > But I want it to be simply placed in the data/pages/<my page> directory, going to data/media is just a nuisance. I often edit pages directly with an editor, if I coudl simply place media files in the same directory where I'm editing page text files it would be much, much easier to use. What's the point of having a separate, parallel, media hierarchy? -- Chris Green -- DokuWiki mailing list - more info at http://www.dokuwiki.org/mailinglist