Will,

Add actpage="true" to the tag and it works...

<cms:ifNotEmpty nodeDataName="my_page_attribute_name" actpage="true">
        Content of "my_page_attribute":
<cms:out nodeDataName="my_page_attribute_name" />
</cms:ifNotEmpty>

Ralf

-----Ursprüngliche Nachricht-----
Von: [email protected] [mailto:[EMAIL PROTECTED] 
Gesendet: Sonntag, 11. Februar 2007 20:30
An: [email protected]
Betreff: [magnolia-user] <cms:ifNotEmpty> on page properties

Dear Magnolians

I would like to output some content that the user sets in the page  
properties (like the page title and so on), but only, if it's not  
empty. Strange enough if I test for

<cms:ifNotEmpty nodeDataName="my_page_attribute_name">
        Content of "my_page_attribute": <cms:out  
nodeDataName="my_page_attribute_name" />
</cms:ifNotEmpty>

I never get anything. Although if I use <cms:out  
nodeDataName="my_page_attribute_name" /> alone, it clearly shows,  
that the node is not empty. Of course I could now do this:

<c:if test="${not empty pageProperties.my_page_attribute_name">
        Content of "my_page_attribute": <cms:out  
nodeDataName="my_page_attribute_name" />
</c:if>

But this does not work for me either because I would like to use the  
same jsp template on a page (displaying the page properties) _and_ in  
a paragraph looping over multiple pages - so I cannot use  
"pageProperties".

Is there a bug in <cms:ifNotEmpty /> or am I using it wrong?

Thanks!

Regards,
Will


----------------------------------------------------------------
for list details see
http://www.magnolia.info/en/magnolia/developer.html
----------------------------------------------------------------

Reply via email to