Hi, as always, appreciate any help.
I have added a public checkbox field to CGBlog.
If I print out all the variables, I can see the checkbox (labelled "sponsored" there.
How do I call it in the summary template?
I tried variations on
{if $sponsored =='1'}
{$entry->fields['sponsored']}
do this..
{/if}
but no go.
Again, any help appreciated.
Cheers,
Paul
[SOLVED] Showing checkbox field definition in CGBlog
[SOLVED] Showing checkbox field definition in CGBlog
Last edited by pwg on Thu May 28, 2015 1:12 pm, edited 1 time in total.
Re: Showing checkbox field definition in CGBlog
Not tested:
(remove the quotes)
Code: Select all
{if $sponsored ==1}Re: Showing checkbox field definition in CGBlog
Many thanks as always Velden, but no go this time.
Still not happening.
Cheers,
Still not happening.
Cheers,
Re: Showing checkbox field definition in CGBlog
Sorry, what was I thinking?
Code: Select all
{if $entry->fields.sponsored->value == 1}
...
{/if}Re: Showing checkbox field definition in CGBlog
Fantastic - thank you again Velden.
I'm looking at a lot of beer I owe you now.
Cheers,
I'm looking at a lot of beer I owe you now.
Cheers,


