* Name: product_info_link
* Date: Aug 24, 2004
* Purpose: URL for the products info
* Input:
* - products_id
*
* Examples: <{product_link products_id=17}>
* Output: http:// ... index.php?content=product_info&products_id=17
* @author r23
* @version 1.0
* @param array
* @param Smarty
* @return string
* @uses smarty_function_html_href_link()
*/
function smarty_function_product_link($params, &$smarty)
{
require_once(MYOOS_INCLUDE_PATH . '/includes/lib/smarty-plugins/function.html_href_link.php');
$aContents = oos_get_content();
$result = array();
$link_params = array();
$link_params = array('content' => $aContents['product_info']);
if (is_array($params)) {
$result = array_merge($link_params, $params);
} else {
throw new SmartyException("products_info_link: extra attribute '$params' must an array", E_USER_NOTICE);
}
return smarty_function_html_href_link($result, $smarty);
}