<?php
if (count($fiches) > 0) : ?>
    <?php echo $info_res; ?>
    <ul class="BAZ_liste <?php echo $param['class']; ?>">
        <?php
        foreach ($fiches as $fiche): ?>
            <li class="bazar-entry" <?php echo $fiche['html_data']; ?>>
                <a href="<?php echo $fiche['url']; ?>"
                    <?php if (isset($param['links_in_new_window'])
                            && filter_var($param['links_in_new_window'], FILTER_VALIDATE_BOOLEAN)) {
                        echo 'target="_blank"';
                    } ?>>
                    <?php
                    $style = '';
                    $color = getCustomValueForEntry(
                        $param['color'],
                        $param['colorfield'],
                        $fiche,
                        ''
                    );
                    if (!empty($color)) {
                        echo '<span class="pellet" style="background-color:' . $color . ';"></span> ';
                    }
                    $icon = getCustomValueForEntry(
                        $param['icon'],
                        $param['iconfield'],
                        $fiche,
                        ''
                    );
                    if (!empty($icon)) {
                        echo '<i class="' . $icon . '"></i> ';
                    }

                    echo '<span class="entry-title">' . $fiche['bf_titre'] . '</span>';
                    ?>
                </a>
            </li>
        <?php
        endforeach; ?>
    </ul>
    <?php echo $pager_links; ?>
<?php endif; ?>