使用 chain.js 处理复杂的模板和图像?

发布于 2024-08-17 06:01:29 字数 415 浏览 2 评论 0原文

我正在研究 jquery 插件 chain.js 相对于其他模板系统(例如 jTemplate)的可能用途。

该网站是一家大型在线零售商。我们有一个类别页面,显示大量产品,例如连衣裙。用户可以单击导航栏上的链接,根据颜色、大小等属性来优化结果。

我们有一个 ajax 调用联系服务器,并使用模板插件来重建页面。

无论如何 - 我们的产品模板需要有一个图像和其下方的各种价格字段。在 jTemplate 上,我们有条件来稍微改变模板。我们似乎无法使用 chain.js 来做到这一点。

另外,我似乎无法使用链绑定到标签属性 - 例如将产品图像 url 绑定到图像 src 标签。

这不可能吗?

任何指示都会很棒 - 发现严重缺乏使用 chain.js 的在线资源。

谢谢,

不列颠哥伦比亚省

I'm researching the possible use of the jquery plugin chain.js over other templating systems such as jTemplate.

the site is a large online retailer. We have a category page showing a large list of products, dresses for example. A user can click on a link on a nav bar te refine the results based on attributes such as colour, size etc.

We have an ajax call contacting the server and we use a template plugin to rebuild the page.

Anyway - our product template needs to have an image and various price fields underneath it. On jTemplate we have conditionals to alter the template slightly. We dont seem to be able to do this with chain.js.

Also I can't seem to bind to tag attributes using chain - for example binding a product image url to the image src tag.

is this impossible?

Any pointers would be great - finding a severe lack of online resources for using chain.js.

thanks,

bc

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

何以笙箫默 2024-08-24 06:01:29

只是关闭这个 - 最终我们废弃了 Chain,因为我们发现它与 Trimpath JavaScript 模板(TrimpathJST)相比很浪费。我们最终使用了这个方法。

just closing this off - eventually we scrapped Chain as we found it wasteful compared to Trimpath JavaScript Templates (TrimpathJST). We used this method in the end.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文