errpeepo wrote
Do you mean if I upload files using dokuwikimediaattachment while in the editor, it doesn't mean that they are not "attached" to the page?
* If you upload files by any means they are not automatically attached to a page (unless you use a template to do so).
* When you upload files they are simply copied to a directory beneath
$DokuWiki/data/media.
* When you create a page a text file is created in a directory beneath
$DokuWiki/data/pages.
* If you create a page that uses DokuWiki syntax to refer to a file that exists in a directory beneath
$DokuWiki/data/media then that file is attached to that page.
e.g. you create a page
$DokuWiki/data/pages/test:start.txt that contains the code
{{:test:dog.jpg}} and there is a picture called
dog.jpg in the directory
$DokuWiki/data/media/test, then when you view the page
http://$Example.com/dokuwiki-test/doku.php?id=test:start you will see the picture
dog.jpg (i.e. that picture is attached to that page).
errpeepo wrote
If that's the case, is there a way to do that without having to type references with the keyboard?
Yes :)
Some plugins that display media will accept wildcards. If you have one of those plugins installed you can use a template to automatically create some code for new pages, and use wildcards to allow media to be "automagically" displayed in the page if files are uploaded to the appropriate media NameSpace (and if that plugin can display that file type).
Example template:-
======@!!PAGE@======
<wrap hide>
Required plugins:-
* wrap
* gallery
* dokuwikimediaattachment
* makemedians
Do not add content above this line
</wrap>
<wrap hide>
Do not add content below this line
</wrap>
----
{{gallery>:@NS@:*?lightbox?320x320?0?=1}}
----
[/color]
Example usage:-
* Make sure you have installed the plugins mentioned in the template.
* Create a file called
__template.txt containing the example code in a directory beneath
$DokuWiki/data/pages
* Any page created in the same directory (NameSpace) as that template, or in a directory beneath it will use that code.
* @!!PAGE@ will be replaced by the page name with the first letter of each word capitalised.
* @NS@ in the gallery tag will be replaced with NameSpace of the new page.
* Anything between the
<wrap hide> and
</wrap> tags will be visible when editing the page but will
not be published.
* When you create a new page (beneath
$DokuWiki/data/pages)
makemedians will create a matching directory beneath
$DokuWiki/data/media (same NameSpace)
* While you are editing the new page you can upload files using the
dokuwikimediaattachment plugin - those files will be stored in the same NameSpace (beneath
$DokuWiki/data/media).
* When you save the page you will be able to see any uploaded image files displayed in an image Gallery.