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-09 19:40:18 +0200 |
commit | 8869dcf1afb62ae34dcf6be6a852af18dff0ff40 (patch) | |
tree | 6b006b19a984516a52767f97419ce4314de3207d /lib/private/template | |
parent | ca121d8438ea0eba6ecf3e3c47c4616d834e787c (diff) | |
download | nextcloud-server-8869dcf1afb62ae34dcf6be6a852af18dff0ff40.tar.gz nextcloud-server-8869dcf1afb62ae34dcf6be6a852af18dff0ff40.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 e4af4aa4e1a..364ec7c8744 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 |