wcmlotus-wcm

How to check the value of Rich Text Field in content of IBM WCM is empty


We have IBM WCM 8.5, and created content which contains Rich Text component in AT field.

I want to check whether the value of Rich Text is empty or not in one of my Menu Component.

I have tried to use "IfEmpty Plugin Component", but it doesn't work.

If any one have solution to this, it is of great help to me.


Solution

  • I have tried using Plugin:ifEmpty in WebSphere Portal 8.5 and they worked fine with Rich Text Editors.

    This was the code that I used in the presentation template:-

     [Plugin:ifEmpty value="[Element context='current' type='content' key='richText']"]Empty![/Plugin:ifEmpty]
     [Plugin:ifNotEmpty value="[Element context='current' type='content' key='richText']"]Not Empty![/Plugin:ifNotEmpty]
    

    It worked pretty well and responded appropriately.

    May be you need to update to the latest fix pack. The other possibility would be that you inadvertently put some value in the rich text editor in the authoring template and all contents created from it took this value. Check the source of the rich text editor to make sure that it is empty.