Skip to content

Commit

Permalink
Merge pull request #43 from margot-vogo/patch-1
Browse files Browse the repository at this point in the history
sitemap.xml template - absolute_url
  • Loading branch information
bobdenotter authored Oct 20, 2019
2 parents 314ed5a + 2bc747c commit cb58a95
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions templates/sitemap_xml.twig
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{% if entry.link is defined %}
{% if entry.link is not empty %}
<url>
<loc>{{ url('homepage')|trim('/', 'right') }}{{ entry.link }}</loc>
<loc>{{ absolute_url(entry.link) }}</loc>
{% if entry.link == "/" %}
{% setcontent record = config.get('general/homepage') returnsingle %}
{% elseif entry.record is defined %}
Expand All @@ -22,7 +22,7 @@
{% for key,value in record.values|default if not ignore_images %}
{% if record.fieldtype(key) == "image" and value != "" %}
<image:image>
<image:loc>{{ url('homepage')|trim('/', 'right') }}{{ value|image(config.get('general/thumbnails/default_image')|first, config.get('general/thumbnails/default_image')|last) }}</image:loc>
<image:loc>{{ absolute_url(value|image(config.get('general/thumbnails/default_image')|first, config.get('general/thumbnails/default_image')|last)) }}</image:loc>
{% if value.alt|default() %}
<image:title><![CDATA[{{ value.alt }}]]></image:title>
{% endif %}
Expand All @@ -34,7 +34,7 @@
{% set list = attribute(record, key) %}
{% for item in list %}
<image:image>
<image:loc>{{ url('homepage')|trim('/', 'right') }}{{ item.filename|image(config.get('general/thumbnails/default_image')|first, config.get('general/thumbnails/default_image')|last) }}</image:loc>
<image:loc>{{ absolute_url(item.filename|image(config.get('general/thumbnails/default_image')|first, config.get('general/thumbnails/default_image')|last)) }}</image:loc>
{% if item.title %}
{% if item.alt|default() %}
<image:title><![CDATA[{{ item.alt }}]]></image:title>
Expand Down

0 comments on commit cb58a95

Please sign in to comment.