I used the Products module for a projects page (had it in 'News' first, but I ran into a few dead ends with that one) and I'm using a fair bit of custom fields. It should be simple to use those custom fields in any of the templates provided, but... I can't seem to figure it out.
In the default summary template it says:
{*
the summary template has access to custom fields via the $entry->fields hash
and to categories via the $entry->categories array of objects. Also
attribute information is available via $entry->attributes.
you should use the get_template_vars and the print_r modifier to see
what is available
*}
I've searched extensively for something on the $entry->fields hash, but no luck.
It seems to me the custom fields are in an array within an array, so after a bit of effort and copy-pasting I came up with:
{foreach from=$entry->fields key='name' item='field'}
{if $field->name == 'summary'}
{$field->value}<br />
{/if}
{if $field->name == 'city'}
{$field->value}
{/if}
{/foreach}That works, but it also doesn't seem very efficient.
Is there a shorter/better/more effective way of displaying those custom fields?
Thanks,
Peter.