We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 25560
    • 16 Posts
    hi

    i just can’t get my head around weblogin pe no matter how many times i read the site.

    on my site I’d like the following (psuedo code):


    if user is logged in {
    display "Welcome Username!"
    display Users Pic
    } else {
    display "Hi, why not register.."
    }

    this will appear on every page, so I guess I use placeholders in the template, but putting "[+user.username+]" displays nothing. what am i doing wrong?

    i can’t find what im looking for, how is this achieved?

    thanks.
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      You have to have the WebLoginPE snippet call in any page that will be using its placeholders. If the snippet isn’t run to set the placeholders, they simply won’t exist.
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 25560
        • 16 Posts
        oh dear god that was obvious

        >.< thank you and forgive me grin