• Hi!
    Is it possible to include a [if][else][/if] inside a [is login][else][/is]?
    I’d like to show “Please log in” if the user is not logged in and if he is, show first_name if he has one or show the user name if he has no first_name.
    I’m trying this code but it won’t work.

    [is login]
    	[if user_field=first_name]
    		[user first_name]
    	[else]
    		[user name]
    	[/if]
    [else]
    		Please Log in
    [/is]

    Thanks for your help and best regards
    Josu

    • This topic was modified 6 years, 10 months ago by jRufus.
Viewing 1 replies (of 1 total)
  • Thread Starter jRufus

    (@jrufus)

    Sorry, I’ve solved it, it was pretty obvious.

    [is login]
    	[if user_field=first_name]
    		[user first_name]
    	[/if]
    	[if not user_field=first_name]
    		[user name]
    	[/if]
    [else]
    		Iniciar sesión
    [/is]

    Thanks anyway
    Josu

Viewing 1 replies (of 1 total)

The topic ‘Nested conditions’ is closed to new replies.