SID-01493: text skin and internal (relative path) links to images
| Status: |
Answered |
TWiki version: |
|
Perl version: |
|
| Category: |
CategoryRendering |
Server OS: |
|
Last update: |
13 years ago |
Hi,
Using the text skin is a great way to fetch content from a twiki site and restyle it on another. However some elements, in particular images, are using src links relative to the twiki installation path thus resulting in broken links.
E.g.
http://xmipp.cnb.csic.es/twiki/bin/view/Xmipp/HowToInstall?skin=text
looks OK but the small arrows in the outline are coded as e.g.
<li> <a href="?skin=text#Step_1_Download"> <img src="/twiki/pub/TWiki/TWikiDocGraphics/arrowbright.gif" width="16" height="16" alt="Arrow blue right" title="Arrow blue right" border="0" /> Step 1: Download</a> <ul>
which breaks upon restyling on another platform:
http://www.scalalife.eu/content/how-install
Notice how the image of the arrow is substituted with the alt text.
Is there a way around that?
Regards,
Rossen
--
RossenApostolov - 2012-06-26
Discussion and Answer
Several options to fix the images:
1. Duplicate the /twiki/pub/TWiki/ directory tree to the www.scalalife.eu server.
2. Use absolute image URLs in your TWiki pages, such as
<img src="%ICONURL{arrowbright}%" alt="" width="16" height="16" />. To make this easier you could define images as preferences settings.
3. You could use the
PublishWebPlugin with a custom skin that looks like your www.scalalife.eu site.
4. Tweak the TWiki code that emits the HTML for %ICON{}% to use absolute image URLs. I do not recommend this because it will break on a TWiki upgrade.
--
PeterThoeny - 2012-06-26
If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.