<?php

/*
 * Smarty plugin
 * -------------------------------------------------------------
 * Type:     function
 * Name:     get_slider
 * Purpose:  get a slider of known name or id
 * -------------------------------------------------------------
 */
function smarty_function_get_news($params, &$smarty)
{
    $default = [
        'count' => 5,
        'section' => 'Novinky',
        'section_id' => 2,
    ];

    $params = array_merge($default, $params);

    $smarty->loadPlugin('Smarty_function_get_articles');

    return smarty_function_get_articles($params, $smarty);
}
