diff options
Diffstat (limited to 'lib/private/template/functions.php')
-rw-r--r-- | lib/private/template/functions.php | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/private/template/functions.php b/lib/private/template/functions.php index 09db011e748..05467e61185 100644 --- a/lib/private/template/functions.php +++ b/lib/private/template/functions.php @@ -42,6 +42,16 @@ function style($app, $file) { } /** + * Shortcut for HTML imports + * @param string $app the appname + * @param string $file the path relative to the app's component folder + */ +function component($app, $file) { + $url = link_to($app, 'component/' . $file . '.html'); + OC_Util::addHeader('link', array('rel' => 'import', 'href' => $url)); +} + +/** * make OC_Helper::linkTo available as a simple function * @param string $app app * @param string $file file |