Commit d598078a authored by Jerome Chauveau's avatar Jerome Chauveau
Browse files

templating function for user static file

parent e5b78485
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="iso-8859-1"?>
<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" 
	 viewBox="0 0 32 32" xml:space="preserve">
<g>
	<g id="stop">
		<rect style="fill:#030104;" width="32" height="32"/>
	</g>
</g>
</svg>
+4 −1
Original line number Diff line number Diff line
<footer class="footer mt-auto py-3 bg-light">
  <div class="container">
    <div class="text-muted text-center">Custom Footer : /templates/_footer.html</div>
    <div class="text-muted text-center">
      <span>Custom Footer : /templates/_footer.html</span>
      <img src="{templating:static('logo.png')}" alt="logo" title="logo" />
    </div>
  </div>
</footer>
 No newline at end of file
+8 −0
Original line number Diff line number Diff line
@@ -148,6 +148,14 @@ declare function templating:static($filename as xs:string, $bundleName as xs:str
    return '/' || $prefix || '/static/' || $filename
};

(:~
 : static user file url
 : @param $filename file name
 : @return string
 :)
declare function templating:static($filename as xs:string) as xs:string{
    templating:static($filename, ())
};

declare function templating:post-render($render as element()) as element(){
    let $bundles := utils:enabled-bundles()