Schema and Microdata: How to add field content = myurlimage and Itemid = id_url in slideshow.tpl.php file?

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
antoniomanco's picture

Hi there

I'm adding directly in code: Schema Microdata and my website, but I have two problems:

1- I want to show the URL of my images in the slideshow.tpl.php module. I need only include the URL of the image in "content = url my first picture

As shown below:

I tried these codes php but without success:

<?php
print render($content['field_image']);
?>

<?php
echo render(file_create_url($node->field_image['und'][0]['uri']));
?>

thanks for your help

Comments

roaldumandal's picture

Hi antoniomanco, have you tried to set the fields data inside a variable, in hook_preprocess_page or node_preprocess_page and print the variable inside your tpl file, maybe I could help if you show some snippets on how you set your data in variable, btw is it a custom block or page? also have you tried to check if the variable is not empty and if not empty whats the value inside the variable?