If Else block in Visual Force Page

Sudipta Deb picture Sudipta Deb · Jun 12, 2014 · Viewed 8.6k times · Source

I need to change the breadcrum on my VF Page based on a condition. Login is: If value is 'A' display 'AAAA', Otherwise display 'Others'. It's inside a label

Can you please let me know how can I do the same? Thanks.

Regards, Sudipta

Answer

Chandresh Koyani picture Chandresh Koyani · Jun 13, 2014

Try this.

<apex:outputLabel value="{!IF(name=='A','AAAA','Others')}" />

Where name is your variable.