node.js - 请问artTemplate中如何将公共html部分抽取出来。子页面又如何载入并实现呢
PHP中文网
PHP中文网 2017-04-17 14:36:05
0
1
620

1、请问公共部分的格式是否应写成完整的HTML格式
2、子页面应如何载入呢?
3、如果有一个新的公共模块,如何抽取成为模板。
4、如果此模板的内容也是动态的。同时渲染父模板和子模板,需如何实现呢。
看了artTemplate官方和baidu的一些文档,还是有些摸不着头绪。请高玩帮看下。

PHP中文网
PHP中文网

认证高级PHP讲师

reply all(1)
左手右手慢动作
  1. I don’t know what you mean by complete. The complete page html structure is not required, only html fragments are required;

  2. Currently artTemplate can only be introduced through {{include './footer_tpl'}};

  3. It depends on how you split it. Just split the public part into another template and then use include to introduce it;

  4. There is no difference in rendering. The imported template also needs rendering data, which can be passed in together when rendering.
    You can just think of include as introducing template code and splicing it into this template. There is nothing profound about it.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template