We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 27305
    • 173 Posts
    I`m using phx to generate different wayfinder calls I have this code

    [+phx:if=`[*section*]`:is=`Board Directors`:or:is=`Group Directors`:or:is=`Associate Directors`:or:is=`Careerszz`:then=`{{leveltwo}}`:else=`{{levelone}}`+] 


    and it works fine, however I want to introduce a new condition so something like this

    if section = "bob smith` then `levelnine` but I don’t have a clue how to implement it, my attempt is below but it breaks

    [+phx:if=`[*section*]`:is=`Board Directors`:or:is=`Group Directors`:or:is=`Associate Directors`:or:is=`Careerszz`:then=`{{leveltwo}}`:elseif=`Careers`:then=`{{levelzero}}`:else=`{{levelone}}`+] 
     


    Any help ini the syntax would be great

    many thanks
    Si
      I made my first site with modx
      ------------------------
      Shopping blog
      Sky+ HD
      • 27305
      • 173 Posts
      I fogot that I could just use two phx blocks like


      [+phx:if=`[*section*]`:is=`Board Directors`:or:is=`Group Directors`:or:is=`Associate Directors`:or:is=`Careerszz`:then=`{{leveltwo}}`:else=` `+] 
      [+phx:if=`[*section*]`:is=`Careers`:then=`{{levelzero}}`:else=`{{levelone}}`+]


      Would that slow things up? or is it the same as having it in one statement?
        I made my first site with modx
        ------------------------
        Shopping blog
        Sky+ HD
        • 3707
        • 241 Posts
        The logic for nested phx calls is:
        [+phx:if=`[*section*]`:is=`Board Directors`:or:is=`Group Directors`:or:is=`Associate Directors`:or:is=`Careerszz`:then=`{{leveltwo}}`:else=`[+phx:if=`[*section*]`:is=`Careers`:then=`{{levelzero}}`:else=`{{levelone}}`+]`+]