add template functions for html imports
This commit is contained in:
parent
70abce0482
commit
4aff85cd0c
|
@ -41,6 +41,16 @@ function style($app, $file) {
|
||||||
OC_Util::addStyle($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);
|
||||||
|
OC_Util::addHeader('link', array('rel' => 'import', 'href' => $url));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* make OC_Helper::linkTo available as a simple function
|
* make OC_Helper::linkTo available as a simple function
|
||||||
* @param string $app app
|
* @param string $app app
|
||||||
|
|
Loading…
Reference in New Issue