Active
Project:
Content Templates (Contemplate)
Version:
5.x-1.9
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
13 Mar 2008 at 00:44 UTC
Updated:
22 Mar 2008 at 18:29 UTC
Hey, I have created a yes/no checkbox for my nodes, this is just a thing saying display link to "blah blah" so if they check it, then the link will be on the node. I have yet to figure how to do this. I have created the check box like this
0|dont display
1|Display link on node
but I have yet to see anything in the variables list after checking and unchecking it.
Comments
Comment #1
jrglasgow commentedI created a content type I called 'checkbox', this content type included a 'Single on/off checkbox' with the 'Allowed values':
So 'No' is the unchecked value and 'Yes' is the checked value.
The following is in my variables for teaser, body, etc...
When the checkbox is checked this is what I get:
To help you any more I would need to see a list of your available variables.
Comment #2
mike.hobo commentedIs this the Interger checkbox or the Text checkbox?
Comment #3
jrglasgow commentedthe above example uses a Text: Single on/off checkbox, I tries it with an Integer checkbo and this is what I get with the checkbox checked:
and this is what I get with the checkbox unchecked:
so you should be able to do it this way:
Comment #4
mike.hobo commentedWow sweet! very helpful!
Comment #5
mike.hobo commentedHmm, I see to be having a problem, whenever it is checked, and then edited and unchecked it says
warning: Cannot use a scalar value as an array in /home/byc/public_html/pdxfm/modules/cck/content.module on line 587.
Comment #6
jrglasgow commentedare you using the latest version of contemplate 5.x-1.9, if not please upgrade to this then give me any errors you get
Comment #7
mike.hobo commentedI have 5.x-1.9 now, but I am thinking that this is a CCK problem.
Comment #8
jrglasgow commentedI did not have this problem when I tested this solution. It could also be your version of PHP.