diff options
author | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-09-08 21:19:44 +0200 |
---|---|---|
committer | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-09-08 21:19:44 +0200 |
commit | 4aff85cd0cc8b4f68d65ee849ad96ce26a730931 (patch) | |
tree | 10528331e0c1cf020381dbeb5e208e54c59c97a5 /lib/private/template | |
parent | 70abce04827517d4391cc1bb3cd71574fc19724a (diff) | |
download | nextcloud-server-4aff85cd0cc8b4f68d65ee849ad96ce26a730931.tar.gz nextcloud-server-4aff85cd0cc8b4f68d65ee849ad96ce26a730931.zip |
add template functions for html imports
Diffstat (limited to 'lib/private/template')
-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..313bedf9c9f 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); + 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 |