Name

<fb:switch/>

Synopsis

<fb:switch>...<fb:default>...</fb:default></fb:switch>

Reads each tag within the tags, and the first one that returns content other than an empty string gets returned as output.

FBML-Specific Attributes

Required

None.

Optional

None.

Example FBML

Here is example FBML code for <fb:switch/>:

<fb:switch> <fb:name uid="3"/> <!-- if name is blank, move 
    on --> <fb:is-it-christmas> It's Christmas! </fb:is-it-christmas>
    <!-- if it's not christmas, move on --> <fb:default> If all the 
    above tags return nothing, display this text </fb:default>
</fb:switch>

Rendered HTML for Single Instance of Tag

If <fb:name/> returns a name, the rendered HTML looks like this:

Rendered name for user with id '3' ('Jesse Stay')

If <fb:name/> returns nothing, but it’s Christmas day, the rendered HTML looks like this:

It's Christmas!

If both <fb:name/> and <fb:is-it-christmas/> return nothing, the rendered HTML looks like this:

If all the above tags return nothing, display this text
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.135.198.174