CGCalendar display value of custom field?
Posted: Wed Aug 30, 2017 7:15 am
When I do {$event.fields.fieldvaluehere} I just get "Array", how do I get it to output the custom field value?
Thank you.
Thank you.
Content management as it is meant to be
https://forum.cmsmadesimple.org/
Code: Select all
<pre>
{$event.fields|print_r}
</pre>
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>
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