We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 1887
    • 50 Posts
    I am building an event section for a web site. There are two TVs where I am having issues.

    Each event can either be marked as fully booked or accept new bookings (fullybooked which is either set to Y or N)
    Each event can have an EventBriteID associated with it (which handles the actual event booking) or it can be blank in which case I want to send you to a web form to "reserve your place"

    So the logic rules for the event listing page are:

    If fullybooked is Y show "Fully Booked"
    If fullybooked is N AND EventBriteID is blank then show "Reserve your place"
    If fullybooked is N AND EventBriteID has a number then show "Book your place"

    I first tried using conditional modifiers using the AND relationship and then tried nested If statements without any luck

    Can anyone think of way to do this other than writing a snippet?

    James

    This question has been answered by multiple community members. See the first response.

    • discuss.answer
      • 4172
      • 5,888 Posts
      doesn't this work?
      [[+fullybooked:is=`Y`:then=`Fully Booked`:else=`
      [[+EventBriteID:is=``:then=`Reserve your place`:else=`Book your place`]]
      `]]
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 1887
        • 50 Posts
        Quote from: Bruno17 at Mar 14, 2015, 06:15 AM
        doesn't this work?
        [[+fullybooked:is=`Y`:then=`Fully Booked`:else=`
        [[+EventBriteID:is=``:then=`Reserve your place`:else=`Book your place`]]
        `]]

        Cheers for that. Got it working with:

        [[+tv.training_fullybooked:is=`Y`:then=`<a href="[[~17]]"><font color="red">Fully Booked</font></a>`:else=`
        [[+tv.training_eventbriteID:is=``:then=`<a href="[[~17##]]?LOC=[[+id]]">Reserve your place</a>`:else=`
        <a href="[[~[[+id]]]]"><b>Book now</b></a>`]]`]] 
        


        Strangely if I remove the ## in the link, the line does not work but does with them.

        James
        • discuss.answer
          • 4172
          • 5,888 Posts
          does it work with:

          [[~17? &LOC=`[[+id]]`]]


          this is the correct syntax for sending url-properties to the makeUrl-tag
            -------------------------------

            you can buy me a beer, if you like MIGX

            http://webcmsolutions.de/migx.html

            Thanks!
            • 1887
            • 50 Posts
            Cheers Bruno, many thanks for your help.