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
News Fields Definitions - checkbox [Solved]
-
- Forum Members
- Posts: 36
- Joined: Fri Jun 06, 2008 6:47 pm
News Fields Definitions - checkbox [Solved]
Last edited by drsceifers on Sun Jun 29, 2008 8:53 pm, edited 1 time in total.
Re: News Fields Definitions - checkbox
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}
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
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
-
- Forum Members
- Posts: 36
- Joined: Fri Jun 06, 2008 6:47 pm
Re: News Fields Definitions - checkbox
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?
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.
-
- Support Guru
- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
Re: News Fields Definitions - checkbox
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.
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.
Re: News Fields Definitions - checkbox
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
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
-
- Forum Members
- Posts: 36
- Joined: Fri Jun 06, 2008 6:47 pm
Re: News Fields Definitions - checkbox [Solved]
It wasn't, that wa the problem, plus it was lower case. I think I knew that.