When I do {$event.fields.fieldvaluehere} I just get "Array", how do I get it to output the custom field value?
Thank you.
CGCalendar display value of custom field?
Re: CGCalendar display value of custom field?
Probably it's somewhere in the sample templates:
My guess (didn't check)
{$event.fields.fieldNAME.value}
It's not very difficult to find it yourself btw
My guess (didn't check)
{$event.fields.fieldNAME.value}
It's not very difficult to find it yourself btw
Code: Select all
<pre>
{$event.fields|print_r}
</pre>
Re: CGCalendar display value of custom field?
Thanks Velden. It did have it in the template, there was an example to loop through, and it did say to use {$event.fields.name}. It did not work for me and I also tried {$event.fields.name.value} which also did not work.velden wrote:Probably it's somewhere in the sample templates:
My guess (didn't check)
{$event.fields.fieldNAME.value}
It's not very difficult to find it yourself btwCode: Select all
<pre> {$event.fields|print_r} </pre>
I know I ask a lot of questions...I do try to find the answer myself first! Mostly successful at doing so, largely not sometimes lol...
Re: CGCalendar display value of custom field?
For reference, this is what my template looks like:
I'm calling it in the Event Display Template and it outputs nothing. I've placed: <pre>{$event.fields|print_r}</pre> and see the value correct so I'm not sure what I am doing wrong
Code: Select all
{if $event.fields.Venue !=""}
<h3>display {$event.fields.Venue.value}</h3>
{/if}
Code: Select all
Array
(
[Link] => Array
(
[field_name] => Link
[field_type] => 0
[field_searchable] => 1
[field_extra] => Array
(
[searchable] => 1
[wysiwyg] => 0
[ddopts] =>
)
[field_order] => 2
[event_id] => 2
[field_value] => http://testlink.co.uk
[raw_value] => http://testlink.co.uk
)
[Venue] => Array
(
[field_name] => Venue
[field_type] => 0
[field_searchable] => 1
[field_extra] => Array
(
[searchable] => 1
[wysiwyg] => 0
[ddopts] =>
)
[field_order] => 0
[event_id] => 2
[field_value] => New Jersey
[raw_value] => New Jersey
)
)
1
Re: CGCalendar display value of custom field?
Figured it out, {$event.fields.Venue.field_value} worked