• Resolved audunmb

    (@audunmb)


    The has_location-placeholder doesn’t work as intended in this code:

    <div class="row-fluid zmt">[events_list]<div class="span12 zmt zmb"><h3 class="event-tittel">#_EVENTLINK</h3></div>{has_image}<div class="row-fluid"><div class="span3">#_EVENTIMAGE</div><div class="span3">#_EVENTDATES <br /> #_EVENTTIMES <br />{has_location} <em> #_LOCATIONNAME, #_LOCATIONTOWN</em><br />{/has_location}Attang?r(er): #_EVENTCATEGORIES</div><div class="span6">#_MYEXCERPT</div></div>{/has_image}{no_image}<div class="row-fluid"><div class="span3 offset1">#_EVENTDATES <br /> #_EVENTTIMES <br /> {has_location}<em>#_LOCATIONNAME, #_LOCATIONTOWN</em><br />{/has_location}Attang?r(er): #_EVENTCATEGORIES</div><div class="span8">#_MYEXCERPT</div></div>{/no_image}
    [/events_list]</div>

    Locations are hidden regardless of whether there is a location or not. has_location works in other places, like in my widget, so I am at loss to why it doesn’t work here? Did I do something wrong or is this a bug?

    All the divs are there for the Bootstrap grid . Removing them doesn’t make a difference.

    https://www.ads-software.com/extend/plugins/events-manager/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter audunmb

    (@audunmb)

    Code without divs for testing:

    [events_list]
    <h3 class="event-tittel">#_EVENTLINK</h3>
    {has_image}#_EVENTIMAGE #_EVENTDATES <br /> #_EVENTTIMES <br />
    {has_location} <em> #_LOCATIONNAME, #_LOCATIONTOWN</em><br />{/has_location}
    Attang?r(er): #_EVENTCATEGORIES #_MYEXCERPT{/has_image}
    {no_image}#_EVENTDATES <br /> #_EVENTTIMES <br />
    {has_location}<em>#_LOCATIONNAME, #_LOCATIONTOWN</em><br />{/has_location}
    Attang?r(er): #_EVENTCATEGORIES #_MYEXCERPT{/no_image}
    [/events_list]

    maybe you mixed things up;

    this works for me (re-arrange conditional placeholder)

    [events_list]
    <h3 class="event-tittel">#_EVENTLINK</h3>
    {has_image}
    #_EVENTIMAGE <br />
    #_EVENTDATES <br />
    #_EVENTTIMES <br />
    Attang?r(er): #_EVENTCATEGORIES #_MYEXCERPT
    {/has_image}
    {no_image}
    #_EVENTDATES <br />
    #_EVENTTIMES <br />
    Attang?r(er): #_EVENTCATEGORIES #_MYEXCERPT
    {/no_image}
    {has_location}<em>#_LOCATIONNAME, #_LOCATIONTOWN</em><br />{/has_location}
    
    [/events_list]
    Thread Starter audunmb

    (@audunmb)

    Thanks for replying. I’m not sure if I mixed things up. Your code works, but it’s a different output than one I was trying to achieve.

    Can you confirm that conditional placeholders can’t be nested?

    Plugin Author Marcus (aka @msykes)

    (@netweblogic)

    by default no but you can add a record to the wp_options table where option_name = dbem_conditional_recursions and option_value = x

    where x is the number of levels you want to go.

    next update I’ll add a possibility for a constant you could add to your wp-config.php instead

    e.g.

    define(‘EM_CONDITIONAL_RECURSIONS’, x);

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Conditional placeholders issue’ is closed to new replies.