Re: [Radiant] if_content not working as expected

2009-02-04 Thread John Toups

FYI,

This is also true of the Continue reading... code block for the Blog  
style template.  In order to not get a Continue Reading... link on  
any entry which is complete in the main tab I must delete the extended  
tab.


Code block from the Articles page define:

r:children:each limit=5 order=desc
div class=entry
  h3r:link //h3
  r:content /
  r:if_content part=extendedr:link anchor=extendedContinue  
Reading#8230;/r:link/r:if_content
  p class=infoPosted by r:author / on r:date format=%b %d,  
%Y //p

/div
/r:children:each


On Feb 3, 2009, at 3:28 PM, N. Turnage wrote:

Hey all. I am using the templates extension and I have 'address1'  
and 'address2' fields in a template used to hold information about a  
number of institutions. When I use r:children:each to iterate over  
the fields for each institution, some or which do not have any  
content in the address2 field, the bullet is still rendered using  
using the following block:


r:children:each
h5r:title //h5
p
r:content part=address1 /
r:if_content part=address2
bull; r:content part=address2 /
/r:if_content
/p
/r:children:each

I was expecting that because the address2 field is empty that the  
bullet and address2 content part would not be rendered. Is that not  
what is supposed to happen?



Thanks,

Nate
___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


Re: [Radiant] if_content not working as expected

2009-02-03 Thread Jim Gay


On Feb 3, 2009, at 3:28 PM, N. Turnage wrote:

Hey all. I am using the templates extension and I have 'address1'  
and 'address2' fields in a template used to hold information about a  
number of institutions. When I use r:children:each to iterate over  
the fields for each institution, some or which do not have any  
content in the address2 field, the bullet is still rendered using  
using the following block:


r:children:each
h5r:title //h5
p
r:content part=address1 /
r:if_content part=address2
bull; r:content part=address2 /
/r:if_content
/p
/r:children:each

I was expecting that because the address2 field is empty that the  
bullet and address2 content part would not be rendered. Is that not  
what is supposed to happen?



Thanks,

Nate


In retrospect, the if_content should be called if_part, since that's  
what it means.
if_content doesn't check for contents in the part (or whether or not  
the part is blank) it checks if the part exists


Would it make sense if a feature was added to it so that you could do  
something like

r:if_content part=address2 check_text=true

-Jim
___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


Re: [Radiant] if_content not working as expected

2009-02-03 Thread Sean Cribbs
With templates, the part is there even if empty.  You probably need a 
tag that checks whether the contents of the part is blank.  Andrew 
vonderLuft has some tags that he intended to submit to core that do just 
that - I'll poke him about it.


Sean

N. Turnage wrote:
Hey all. I am using the templates extension and I have 'address1' and 
'address2' fields in a template used to hold information about a 
number of institutions. When I use r:children:each to iterate over the 
fields for each institution, some or which do not have any content in 
the address2 field, the bullet is still rendered using using the 
following block:


r:children:each
h5r:title //h5
p
 r:content part=address1 /
 r:if_content part=address2
 bull; r:content part=address2 /
 /r:if_content
/p
/r:children:each

I was expecting that because the address2 field is empty that the 
bullet and address2 content part would not be rendered. Is that not 
what is supposed to happen?



Thanks,

Nate
___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant



___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


Re: [Radiant] if_content not working as expected

2009-02-03 Thread N. Turnage

Jim Gay wrote:
In retrospect, the if_content should be called if_part, since that's 
what it means.
if_content doesn't check for contents in the part (or whether or not 
the part is blank) it checks if the part exists



Ah, I see.
Would it make sense if a feature was added to it so that you could do 
something like

r:if_content part=address2 check_text=true

Yes, that would be immensely helpful.


~Nate
___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


Re: [Radiant] if_content not working as expected

2009-02-03 Thread N. Turnage

Sean Cribbs wrote:
With templates, the part is there even if empty.  You probably need a 
tag that checks whether the contents of the part is blank.  Andrew 
vonderLuft has some tags that he intended to submit to core that do 
just that - I'll poke him about it.

Thanks. Are there any current extensions that might help out with this?



~Nate
___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant