[solved] CGCalendar - display custom file field value is "0"

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
curlypinky
Forum Members
Forum Members
Posts: 109
Joined: Thu Sep 04, 2008 3:49 am
Location: Hawaii

[solved] CGCalendar - display custom file field value is "0"

Post by curlypinky »

CMSMS 1.7
CGCalendar 1.5.2

I have CGcalendar with 3 custom fields - Meet-Flyer (file), Meet-Results (file) and Location (text). I am trying to display the file field by calling it directly:
{$event.fields.Meet-Flyer} or {$event.fields.Meet-Results} however instead of displaying the filename it displays "0"

Using the default foreach cycle through all fields causes the filename to be displayed propertly:
{foreach from=$event.fields key='fieldname' item='fieldvalue'}
     {$fieldname}: {$fieldvalue}
{/foreach}
But for purposes of my template I really need to be able to call it directly. What is the proper format to display the value of a file field?
Thanks!
Alane
Last edited by curlypinky on Fri May 07, 2010 11:22 pm, edited 1 time in total.
njprrogers
Forum Members
Forum Members
Posts: 30
Joined: Fri Oct 31, 2008 12:51 pm

Re: CGCalendar - display custom file field value is "0"

Post by njprrogers »

I'll second that emotion. Same CMSMS and CGcalendar versions.

Anybody got an answer for this one?
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: CGCalendar - display custom file field value is "0"

Post by calguy1000 »

Read the smarty manual.

- is a math operator.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
curlypinky
Forum Members
Forum Members
Posts: 109
Joined: Thu Sep 04, 2008 3:49 am
Location: Hawaii

Re: CGCalendar - display custom file field value is "0"

Post by curlypinky »

Ah I did not realize that. So Custom Fields names can only be alpha-numeric, no spaces no dashes. OK that works, thanks.
Alane
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: [solved] CGCalendar - display custom file field value is "0"

Post by calguy1000 »

No, I didn't say that... I said that - is a math operator.
There are ways around it.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
curlypinky
Forum Members
Forum Members
Posts: 109
Joined: Thu Sep 04, 2008 3:49 am
Location: Hawaii

Re: [solved] CGCalendar - display custom file field value is "0"

Post by curlypinky »

What is the proper way to reference a field that has spaces or reserved characters in its name? I've tried to find a solution but none of my attempts are correct.
Post Reply

Return to “Modules/Add-Ons”