<?php
/**
 * -------------------------------------------------------------------------
 *
 * The snippet for rendering the search results (that is a list of publication lists).
 *
 * -------------------------------------------------------------------------
 *
 * These system variables are available:
 *
 *     $params   = array of arrays of publications           ( see file tiny.news.feed/Themes/default/*-list.tpl )
 *     $cms      = your application                          ( see file mimimi.core/Routines.php -> mimimiInclude -> $cms )
 *     $folder   = relative path of the application's folder ( see file mimimi.core/Routines.php -> mimimiInclude -> $folder )
 *     $filename = relative path of this TPL file            ( see file mimimi.core/Routines.php -> mimimiInclude -> $filename )
 *     $file     = absolute path of this TPL file            ( see file mimimi.core/Routines.php -> mimimiInclude -> $file )
 *
 * -------------------------------------------------------------------------
 *
 * @package    MimimiFramework
 * @subpackage Examples / Tiny News Feed site
 * @license    GPL-2.0
 *             https://opensource.org/license/gpl-2-0/
 * @copyright  2022 MiMiMi Community
 *             https://mimimi.software/
 *
 * -------------------------------------------------------------------------
 */

                                                        // -----------------
    if ( $params ) {                                    // if there is a non-empty list
        global $items;                                  //     make a variable required inside the snippet below
                                                        // -----------------
        foreach ($params as $type => $items) {          //     walk through the provided list
            mimimiModule([                              //         render a snippet       ( see file mimimi.core/Routines.php -> mimimiModule )
                'snippets/list.tpl',                    //         . . from this template ( see file tiny.news.feed/Themes/default/snippets/list.tpl )
                $type                                   //         . . with this viewer name passed as the $params argument
            ]);                                         //
        }                                               //
    }                                                   //
                                                        // -----------------
