News Fields Definitions - checkbox [Solved]

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
drsceifers
Forum Members
Forum Members
Posts: 36
Joined: Fri Jun 06, 2008 6:47 pm

News Fields Definitions - checkbox [Solved]

Post 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
Last edited by drsceifers on Sun Jun 29, 2008 8:53 pm, edited 1 time in total.
User avatar
kermit
Power Poster
Power Poster
Posts: 693
Joined: Thu Jan 26, 2006 11:46 am

Re: News Fields Definitions - checkbox

Post 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}
eternity (n); 1. infinite time, 2. a seemingly long or endless time, 3. the length of time it takes a frozen pizza to cook when you're starving.
4,930,000,000 (n); 1. a very large number, 2. the approximate world population in 1986 when Microsoft Corp issued its IPO. 3. Microsoft's net profit (USD) for the quarter (3 months) ending 31 March 2007.
CMSMS migration and setup services | Hosting with CMSMS installed and ready to go | PM me for Info
drsceifers
Forum Members
Forum Members
Posts: 36
Joined: Fri Jun 06, 2008 6:47 pm

Re: News Fields Definitions - checkbox

Post 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?
Last edited by drsceifers on Sun Jun 29, 2008 7:13 pm, edited 1 time in total.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: News Fields Definitions - checkbox

Post by calguy1000 »

if you did a {$entry|print_r} you'll see everything.
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.
User avatar
kermit
Power Poster
Power Poster
Posts: 693
Joined: Thu Jan 26, 2006 11:46 am

Re: News Fields Definitions - checkbox

Post by kermit »

is the custom field itself "public" ?
eternity (n); 1. infinite time, 2. a seemingly long or endless time, 3. the length of time it takes a frozen pizza to cook when you're starving.
4,930,000,000 (n); 1. a very large number, 2. the approximate world population in 1986 when Microsoft Corp issued its IPO. 3. Microsoft's net profit (USD) for the quarter (3 months) ending 31 March 2007.
CMSMS migration and setup services | Hosting with CMSMS installed and ready to go | PM me for Info
drsceifers
Forum Members
Forum Members
Posts: 36
Joined: Fri Jun 06, 2008 6:47 pm

Re: News Fields Definitions - checkbox [Solved]

Post by drsceifers »

It wasn't, that wa the problem, plus it was lower case. I think I knew that.
Post Reply

Return to “CMSMS Core”