1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-01 20:30:39 +02:00

URL shortcode update

This commit is contained in:
SecretR
2013-02-28 17:21:17 +02:00
parent c9bdf62739
commit 81f0aa86e5

View File

@@ -0,0 +1,20 @@
<?php
// $Id$
/**
* Example usage (valid news data + option for full URL)
* {URL=news/view/item|news_id=1&news_sef=sef-string&category_id=1&category_sef=category-sef&options[full]=1}
*/
function url_shortcode($parm)
{
list($route, $parms) = eHelper::scDualParams($parm);
if(empty($route)) return '';
$options = array();
if(isset($parms['options']))
{
$options = $parms['options'];
unset($parms['options']);
}
return e107::getUrl()->create($route, $parms, $options);
}