summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBernhard Posselt <Raydiation@users.noreply.github.com>2014-09-09 14:07:46 +0200
committerBernhard Posselt <Raydiation@users.noreply.github.com>2014-09-09 14:07:46 +0200
commitd02f6c7ebe304e069c985f36e7eb41a85badc443 (patch)
tree8ac55fb7f869bda8f2c7084da681d606c3e8c4e3
parentfd92fc7c472dfcd787dd02c2a537e86bacd1afc4 (diff)
parentf685d036743c44eaa5fd11ad8fdf73de89a1445b (diff)
downloadnextcloud-server-d02f6c7ebe304e069c985f36e7eb41a85badc443.tar.gz
nextcloud-server-d02f6c7ebe304e069c985f36e7eb41a85badc443.zip
Merge pull request #10947 from owncloud/html-imports
add template functions for html imports
-rw-r--r--lib/private/template/functions.php10
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