RelativeUrls
Question
Is it possible to show an image in a wiki page with a relative path? Instead of:
http://www.pmwiki.org/pmwiki/pub/skins/pmwiki/pmwiki-32.gif
I would like to use something like:
images/pmwiki-32.gif
Answer
Try using InterMap? links as described on the CustomInterMap? page.
Place the following line in local/localmap.txt (create localmap.txt if needed):
Images /pmwiki/pub/skins/pmwiki/ OR, if this does not work, try: (maybe the above is a typo?) Images: /pmwiki/pub/skins/pmwiki/
You can use the following markup to get to the image
Images:pmwiki-32.gif
The resulting HTML output will be
<img src="/pmwiki/pub/skins/pmwiki/pmwiki-32.gif" />
Question
Is there a way to configure the system to generate relative URL (without servernamein it) for all internal links (eg. to other Wiki-Pages)?
Answer
Maintain the parameter $ScriptUrl
in config.php according to your needs
Notes and Comments
These instructions came from an email written by Pm. The relative URLs question gets asked so often, I thought it deserved a Cookbook page.
Also note that the "Attach:image.gif" markup could be considered a form of relative addressing that displays images from the uploads directory of the current page. See UploadsAdmin? for more details.
- This recipe was last tested on PmWiki version: n/a
- This recipe requires at least PmWiki version: should work with any version
See Also
Contributors
Category: Images