We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 25979
    • 178 Posts
    Hi, another question - I have an area, when only two or three people would talk to themselves. That is way I want to differ by color their comments and comments titles.

    I see sth like that in comment tpl:
    [+comment.createdby:userinfo=`username`:ifempty=`[+comment.custom.name:ifempty=`[+jot.guestname+]`:esc+]`+]


    Is there a way I could change it to use different css classes depending on which name is used?
    I will be having two users: [email protected], and [email protected] as moderators. The third one - client will be asigned automagically by jot, in template I think I could use [+user.username+] form webloginpe. In other places works like a charm.

    I don’t think I fully understand the code I quoted above, so that is why I ask.

    Be gratefll for help.
    Regards,
    Mike
      //Why use windows since there is a door?//
      • 7231
      • 4,205 Posts
      [+comment.createdby:userinfo=`username`:ifempty=`[+comment.custom.name:ifempty=`[+jot.guestname+]`:esc+]`+]

      This is PHx syntax, you can read up on it here: http://wiki.modxcms.com/index.php/PHx

      I am not familiar with the particuliarities of Jot’s PHx support but I figure that you could alter this to do what you want by adding an OR statement to include the second user and change the output sections to css class names.
        [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

        Something is happening here, but you don't know what it is.
        Do you, Mr. Jones? - [bob dylan]