diff --git a/lib/private/template/functions.php b/lib/private/template/functions.php
index 09db011e748eefeb0f931ce8a5fe6534ada6be01..05467e611850917beff087bb00e291a87e5ecd70 100644
--- a/lib/private/template/functions.php
+++ b/lib/private/template/functions.php
@@ -41,6 +41,16 @@ function style($app, $file) {
 	OC_Util::addStyle($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