首页 > 解决方案 > Big Cartel - 在我的每个类别中添加描述文本

问题描述

我有几个星期无法在我的 BigCartel 网站上解决的问题。

我想为我的每个类别添加描述性文本。目前没有可以在页面中以我的类别名称输入描述的文本块,我希望每个类别的文本都不同。

我认为在照片中它会更简单......(附上一张图片)。

在此处输入图像描述

谢谢你帮助我:)

最好的

标签: htmlcsstextinsertbigcartel

解决方案


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.


推荐阅读