Announcement

Collapse
No announcement yet.

How to make a conditional statement

Collapse
X
Collapse
First Prev Next Last
  • Filter
  • Time
  • Show
Clear All
new posts

    How to make a conditional statement

    Hy,

    I am trying to edit the 'Add a group template' (sgadmin_adminsettings)

    When i land on this page site.com/sgadmin/create/settings?groups_section=cars i am adding this in the url : ?groups_section=cars

    In sgadmin_adminsettings template i tried the following:

    <vb:if condition="$_GET['groups_section'] ==cars">Say Hello</vb:if>


    But it is not working.

    Can you please explain to me how this conditions should work?

    Thank you!

    #2
    You need to enclose cars inside quotes as it is a literal string.
    Code:
    You need to be logged in to view the code. Login or Register now!
    If that's still doesn't work then you don't have direct access to GET querystring parameters from there. Try debugging the value of the routeInfo variable to see if groups_section querystring parameter is there.

    Code:
    You need to be logged in to view the code. Login or Register now!
    debugvardump is a useful debugging code few people only know.

    Comment


      #3
      Btw, I've moved this topic to the more appropriate forum channel.

      Comment


        #4
        Sorry about opening it in the wrong forum. I noticed that because i was working tired, i was trying to add the condition in another style. So now it works ok.

        Thank you for taking out of your time, and replying here!

        Comment

        Working...
        X