简体   繁体   English

单页站点的客户端模板

[英]Client-side templating for a Single page site

Usually in a CMS, there is a template engine where we define "templated html pages", when URL is accessed for a specific page it returned the "templated" rendered page. 通常在CMS中,有一个模板引擎,我们在其中定义“模板html页面”,当访问特定页面的URL时,它返回“模板”呈现的页面。

However, I want to do single page site and deploy it in CMS, while taking advantage of a template engine that runs on the client-side. 但是,我想做一个单页站点并在CMS中部署它,同时利用在客户端运行的模板引擎。

In my current setup, I have a "root" page in which other pages are injected in a specified div like: 在当前设置中,我有一个“根”页面,其中的其他页面被注入到指定的div中,例如:

<body>
   $page.content
</body>

Content pages that are injected in this root page are mapped with a URL like: /home /blog /etc 注入到此根页面中的内容页面使用以下URL进行映射: /home /blog /etc

What are the options of implementing such single-page site with templating support? 在模板支持下实现这种单页网站有哪些选择? What I need is a JS Template engine that does not need any server side backend or something... 我需要的是一个不需要任何服务器端后端或其他任何东西的JS模板引擎。

如果喜欢Templet引擎,请尝试http://mustache.github.com/ ,这会有所帮助

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用nodejs和pug进行客户端模板 - Client-Side templating with nodejs and pug 客户端和服务器端呈现的模板语言 - Templating language for both client-side and server-side rendering 单个页面上多个 forms 的客户端表单验证 - Client-side form validation for multiple forms on single page 编写单页客户端专用网页 - Writing a single page client-side only webpage 客户端模板,服务器端模板或原始克隆和编辑存根DOM元素客户端? - Client-side templating, server-side templating or raw cloning&editing stub DOM elements client-side? Ruby和客户端JS的模板语言 - Templating language for both Ruby and client-side JS 在现有的Codeigniter hmvc应用程序中实现requirejs和客户端模板 - Implementing requirejs and client-side templating in existing codeigniter hmvc application Node.js:客户端模板v / s服务器端模板 - Node.js: Client-Side Templating v/s Server-Side Templating 使用服务器端和客户端渲染的单页ReactJS应用程序? - Single-page ReactJS app using both server-side and client-side rendering? 从一页存储客户端数据以在另一站点上填写表格 - Storing data client-side from one page to fill out a form on the other site
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM