Skip to content

Commit

Permalink
Merge pull request #30 from Kunstmaan/fix_search_indexing
Browse files Browse the repository at this point in the history
fix error when indexing ImagePagepart
  • Loading branch information
jverdeyen committed May 20, 2014
2 parents 381e46a + 717e12f commit 35c68a7
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions Resources/views/ImagePagePart/view.html.twig
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
{% if resource.media is not empty %}
<div class="image-pp">
{%- if resource.link is defined and resource.link != "" -%}
<a href="{{ resource.link }}" {% if resource.openinnewwindow %}target="_blank"{% endif %}><img src="{{ app.request.schemeandhttphost ~ app.request.basePath ~ asset(resource.media.url) }}" alt="{{ resource.alttext }}" /></a>
{%- else -%}
<img src="{{ app.request.schemeandhttphost ~ app.request.basePath ~ asset(resource.media.url) }}" alt="{{ resource.alttext }}" />
{%- endif -%}
{% set imgUrl = '' %}
{% if app.request %}
{% set imgUrl = app.request.schemeandhttphost ~ app.request.basePath ~ asset(resource.media.url) %}
{% endif %}
{% if resource.link is defined and resource.link != "" %}
<a href="{{ resource.link }}" {% if resource.openinnewwindow %}target="_blank"{% endif %}><img src="{{ imgUrl }}" alt="{{ resource.alttext }}" /></a>
{% else %}
<img src="{{ imgUrl }}" alt="{{ resource.alttext }}" />
{% endif %}
</div>
{% endif %}

0 comments on commit 35c68a7

Please sign in to comment.