Sorry if this has already been answered but I've searched the forums with no luck. Quick question form a smarty tag newbie:
I've created extra field definitions in news module for certain types of news categories / articles - now I would like to be able to style the field definitions when they are included in the article(s). I've tried various ways but I've been having trouble displaying them let alone styling them.
I've tried:
Code: Select all
{if $customfieldscount gt 0}
{foreach from=$customfields item=customfield}
{capture assign=$customfield->name}{$customfield->value}{/capture}
{/foreach}
{/if}
Code: Select all
{$your_field_name}
I'm using:
Code: Select all
{if isset($entry->fields)}
{foreach from=$entry->fields item='field'}
<div class="NewsDetailField">
{if $field->type == 'file'}
{* this template assumes that every file uploaded is an image of some sort, because News doesn't distinguish *}
<img src="{$entry->file_location}/{$field->value}"/>
{else}
{eval var=$field->value}
{/if}
</div>
{/foreach}
{/if}
Article Title
Article Date
<underline>
Category Name
Posted By
Article Introduction
**UK Version **Russian Version
**Story Title **Story Title
**Story Audio Link **Story Audio Link
**Main Story Text **Main Story Text
Apologies if this has been asked before or if it's really simple to do but I'm running out of time on a project and could do with some direction.
Thanks in advance for any help you can provide.