snap framework - Heist top level tags from template? -
i'm trying learn how use snap , heist , wanted put links javascript libraries in on place. created template in _js-libs.tpl
:
<bind tag="jquery"> <script type="text/javascript" src="/js/jquery-2.1.0.js"></script> </bind> <bind tag="d3js"> <script type="text/javascript" src="/js/d3.js"></script> </bind>
and tried in base.tpl
template:
<html> <head> <title>snap web server</title> <link rel="stylesheet" type="text/css" href="/screen.css"/> <apply template="_js-libs"/> <jquery/> <d3js/> </head> ... snip ...
but resulted in <jquery></jquery>
, <d3js></d3js>
in page. take bind tags not visible in template has applied template containing bind. how create top level tags in templates? can find examples of creating top level tags in haskell code.
the bind tag works locally template. exception if use bind tags inside body of apply tag mechanism pass named "parameters" applied template.
Comments
Post a Comment