1

can you help me create a view template? Indeed when I rewrite the output field "image" no labels is displayed. So I created a "views-view-field--sitemap--page-6.tpl.php" template file in the folder of my theme, but I see no change. I emptied the cache.

<?php

$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;

enter image description here enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy