Hello I created a sitemap with the modules "Views and data export". The sitemap of my page works fine, but I would add images to my page.

The sitemap should look at first capture, I do a test with figure and they are well placed. When I "rewrite the results" the tag is ignored. How to implement these label ? it's been weeks since I'm on it.

Thank you

If I replace the HTML tags with text data it works:

enter image description here

However when I add HTML it gets removed:

enter image description here

I found answers to How add markup and prefix / suffix for computed field. Can you tell me how to put that in place?

  • I speak not of labels that are not displayed during rewriting. You see what I want to do? with capture
    – user60539
    Commented Apr 22, 2016 at 10:23
  • there is the same problem here drupal.stackexchange.com/questions/109079/…
    – user60539
    Commented Apr 22, 2016 at 12:54
  • and here drupal.org/node/1407906
    – user60539
    Commented Apr 22, 2016 at 12:55
  • I've updated your question, please have a look if this is what you mean. Commented Apr 22, 2016 at 17:48
  • yes, thank you for the update. This is exactly what I want.
    – user60539
    Commented Apr 22, 2016 at 20:18

1 Answer 1


HTML tags, ugh, finally I understand your Q.

You can re-write your field using template files.

Go to /sites/all/themes/YourTheme/templates folder and

create views-view-fields--[view-name]--[machine-name].tpl.php

For Example:

If you view is called "Hello World" and the machine name is block_1

then it would be views-view-fields--hello-world--block-1.tpl.php

Inside your template file you put:


$fields["path"]->content = '<loc>' . $fields["path"]->content . '</loc>';

$fields["field_image"]->content = '<image:loc>' . $fields["field_image"]->content . '</image:loc>' . '<image:title>' . $fields["field_image-atl"]->content . '</image:title>';

echo $fields["path"]->content;
echo $fields["field_image"]->content;

When you are working with template files, remember to clear/flush the cache to see the changes.

Now your HTML tags should not get removed.

  • thank you for this information, but I have never done this. Can you give me more details on how to proceed? I posted a picture of the view in response
    – user60539
    Commented Apr 29, 2016 at 16:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.