Support » Plugin: Events Manager » Conditional placeholders for user-created attributes?

  • Resolved David E. Smith

    (@desmith)


    The provided event templates, and the documentation, cover a lot of conditional cases for different event attributes, like if an event is in the past or future, has a location or not, has available booking capacity, and so on.

    Is it possible, within the templates, to display text based on whether a user-created attribute is blank, or has a value?

    Under General -> Event Attributes, I’ve created a few custom event attributes:

    #_ATT{prizes}
    #_ATT{shards}
    #_ATT{format}{Archon|Archon Chainbound|Sealed|Sealed Triad}

    The first two of those could be blank, whether they’re not applicable to a given event or were simply forgotten.

    In my template, I presently have this:

    <p>
    <strong>Format: </strong>#_ATT{format}<br />
    <strong>Prize Support: </strong>#_ATT{prizes}<br />
    <strong>Æmbershards: </strong>#_ATT{shards}
    </p>

    If a given attribute wasn’t defined, there’s just an awkward blank space.

    For most of the “defined” event attributes, there’s a {has_foo} wrapper you can use to change the output – in this case, I’d want to not show a given line of text if that attribute wasn’t set. Is this possible, and if so, what’s the syntax for it?

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.