CoreCommunity ExtensionsIncubatorDistributionsTYPO3 4.5 ProjectsTYPO3 4.7 ProjectsTYPO3 6.0 ProjectsTYPO3 6.1 ProjectsTYPO3 6.2 Projects (+)

Bug #6305

Templates with images are displayed wrong in articles

Added by Fissenebert over 3 years ago. Updated over 2 years ago.

Status:New Start date:2010-02-01
Priority:Must have Due date:
Assignee:Denis Royer % Done:

0%

Category:Wiki Rendering Spent time: -
Target version:dr_wiki 1.x
Votes: 0

Description

Hello.

I made a template to display a custom image (NOT a system image like IMAGE_ERROR), a title and content in a box. The remplate structure is four DIVs. DIV-1 (class="wiki-box-four") covers the whole template, DIV-2 (class="wiki-box-subcolumns") covers 2 inner DIVs, DIV-3 (class="wiki-box-cl") is a left column, DIV-4 (class="wiki-box-cl") is a right column. Here is the source code of the template (taken from our project-documentation, NOT from the template itself):

#####################################################################
#
# Template: Box with image
#
# Builds a 2 column DIV-structure to keep f.e.
# an image in the left column and a title and text in the right column.
#
# Usage: {{TemplateName|Title|Text to display}}
#
<div class="wiki-box-four">
    <div class="wiki-box-subcolumns">
        <div class="wiki-box-cl">http://www.mydomain.com/fileadmin/images/image.png</div>
        <div class="wiki-box-cr">'''{{{1}}}'''
            ----
            {{{2}}}
        </div>
    </div>
</div>

The preview of the template when editing was finished looked fine (attached file template_preview.png), but only if the image was accessed by its complete web-address. Using relative paths like fileadmin/images/image.png did not work.

But when using the template in an article, dr_wiki did not display the imgage but its URL (attached file template_usage.png).

Why does dr_wiki change the display of templates? How can I use custom images in templates?

By the way:

Sorry, but using custom images in dr_wiki is - not very user friendly.

What about implementing code to allow relative paths to images in articles and templates, f.e. fileadmin/images/image.png? This would make life much easier. If an image is accessed only by a path without a domain, dr_wiki should add the current domain. If an image is accessed by a complete web-address (including a domain), dr_wiki should use this address. That would be much better, even when reusing code on different domains.

Thank you for your attention and best wishes.

LookyLook

template_preview.png - preview of the template in edit mode (2.2 kB) Fissenebert , 2010-02-01 17:22

template_usage.png - template rendering when using it (5.8 kB) Fissenebert , 2010-02-01 17:22

Also available in: Atom PDF