SOLVED: News Module: Show Field Definition on a Template
Posted: Wed Oct 02, 2013 7:03 pm
Hi,
In the news module, I created a field module for the user to assign an image to a news item. In my summary and detail template, this is how I call it:
NOW, I want to add that image on my news template. I tried this:
But it is not appearing. How can I show a news field definition on a template?
Reason I am calling that image on my template, is so that image can be added to the facebook META data, and that image will be picked up if a user shares that page. The Facebook META data has to sit in the HEAD of the page, not in the BODY of the page.
Thanks for any help!
Joe C.
In the news module, I created a field module for the user to assign an image to a news item. In my summary and detail template, this is how I call it:
Code: Select all
{if !empty($entry->summaryimage)}
<img src="{$entry->file_location}/{$entry->summaryimage}" alt="" />
{else}
<img src="uploads/images/news-default-image.gif" alt=""/>
{/if}
Code: Select all
{if !empty($entry->summaryimage)}
<meta property="og:image" content="{root_url}/{$entry->summaryimage}" />
{/if}
Reason I am calling that image on my template, is so that image can be added to the facebook META data, and that image will be picked up if a user shares that page. The Facebook META data has to sit in the HEAD of the page, not in the BODY of the page.
Thanks for any help!
Joe C.