Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-15014

image identifier is hardcoded in upload_images.tpl

    XMLWordPrintable

Details

    Description

      Hi,

      upload_images.tpl,
      Line 140:

      {attribute_view_gui attribute=$img.object.data_map.image image_class=small}

      We have some image classes where the identifier of the image is not "image", so the image isn't displayed.

      Someting like this would be nice:

      {def $image_id=false()} {if is_set( $img.object.data_map.image )} {set $image_id='image'} {else} {foreach $img.object.data_map as $img_key => $img_item} {if $img_item.data_type_string|eq( 'ezimage' )} {set $image_id=$img_key} {break} {/if}
      {/foreach}
      {/if} {if $image_id} {attribute_view_gui attribute=$img.object.data_map.$image_id image_class=small} {/if} {undef $image_id}

      Best wishes,
      Georg.

      Attachments

        Activity

          People

            andre1 andre1
            emil.webber emil.webber
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: