Page 1 of 1

News Fields Definitions - checkbox [Solved]

Posted: Sun Jun 29, 2008 6:26 pm
by drsceifers
I think I understand how to use $entry->private to grab the value of the checkbox I have defined. I just can't find any documentation on how to address its content. Should I use isset() and what is the value if it is set/not set.

I am trying to use field I added to mark news as podcast/videocast, private, etc.

Thanks
Don

Re: News Fields Definitions - checkbox

Posted: Sun Jun 29, 2008 6:30 pm
by kermit
Try something like this:

The checkbox was {if $entry->customfieldname eq '1'}checked{else}unchecked{/if}

or

The checkbox was {if $entry->customfieldname}checked{else}unchecked{/if}

Re: News Fields Definitions - checkbox

Posted: Sun Jun 29, 2008 7:09 pm
by drsceifers
No luck... I even tried just printing $entry->private (that was my field) and it doesn't see it.

In the summary template, I see this construct
{foreach from=$entry->fields item='field'}

Is my additional field part of this "field", If so, can I address an actual field by name?

Re: News Fields Definitions - checkbox

Posted: Sun Jun 29, 2008 7:14 pm
by calguy1000
if you did a {$entry|print_r} you'll see everything.

Re: News Fields Definitions - checkbox

Posted: Sun Jun 29, 2008 7:42 pm
by kermit
is the custom field itself "public" ?

Re: News Fields Definitions - checkbox [Solved]

Posted: Sun Jun 29, 2008 8:52 pm
by drsceifers
It wasn't, that wa the problem, plus it was lower case. I think I knew that.