html - Big Cartel - 在我的每个类别中添加描述文本
问题描述
我有几个星期无法在我的 BigCartel 网站上解决的问题。
我想为我的每个类别添加描述性文本。目前没有可以在页面中以我的类别名称输入描述的文本块,我希望每个类别的文本都不同。
我认为在照片中它会更简单......(附上一张图片)。
谢谢你帮助我:)
最好的
解决方案
So the first thing to do is to make sure you have the theme api imported Second: This escape here will display your JSON array for all categories:
{{ categories.all }}
I placed this in the bottom of the layout html. Although I'm sure there are some other spots that would work just fine. Using that array, loop through it to dynamically create an input box for each category and place it wherever you would like
The next question here, is how you would save and maintain the 'description' or whatever it is you want for that particular category to stay. As I assume you probably want a unique value for each category. Going to be working on just this thing tonight or tomorrow. So I'll check back and update my answer once I've got that part figured out.
On a side note, if your categories aren't going to be changing all the type, you could create just a series of your own variables that match the category and hard-code "write" the value for the text box as it pertains to that category.
推荐阅读
- python - 在 Jupyter Notebook 中,代码片段中错误输出的着色如何帮助我找出错误?
- javascript - 如何在 Google Chrome 中关闭 Preserve JavaScript console perseverance
- ansible - ansible Galaxy 角色的命令/模块名称与内置的 runit 模块冲突
- node.js - 从 Google Cloud Storage 获取绝对文件路径以用于 pdf-text-extract
- scala - 如何收集错误是scala,然后将它们全部放在一起
- asp.net-mvc - ASP.NET MVC / Core and Entity Framework 6 / Core - 配置和验证
- python - 字段值在列表中的 Django 查询集
- arrays - MongoDB具有唯一值的多个数组
- python - 在给定一条线的情况下找到周围的矩形区域
- ruby-on-rails - 将 has_many 更改为 has_and_belongs_to_many