Reply To: Mashup Popup template

Home Forums MapPress Support Mashup Popup template Reply To: Mashup Popup template



    I see a few small problems in the filter & template:

    1) For the filter, you begin by appending to $html, but it’s not defined yet.  So replace:

    $html .= '<span class="price label label-warning">';


     $html = '<span class="price label label-warning">';

    2) In the template, I’d suggest using ‘<span>’ instead of ‘i’.  Also, when you use two braces the HTML is escaped – i.e. the returned HTML from the filter was being escaped.  Use 3 braces instead, which outputs the value without modifying it:

    <br />
    <ul class="infos">
    <# if (poi.props.annonce_surface) { #>
    <span class="fal fa-home" aria-hidden="true"></span> {{poi.props.annonce_surface}} m²
    <# } #>
    <span class="fal fa-bed" aria-hidden="true"></span> {{poi.props.annonce_chambres}} chambre(s)
    <span class="fal fa-bath" aria-hidden="true"></span> {{poi.props.annonce_sdb}} SDB
    {{{poi.props.prix}}} €