You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
参考文章分类的元数据表单实现,希望商城商品分类也能支持自定义元数据,用于分类图标、颜色等展示需求,并让主题模板读取。
使用场景
开发商城主题时,需要为商品分类配置不同的图标和颜色,在侧边栏、类别页等位置展示。希望这些信息可以直接在“编辑分类”中维护。
当前观察
本地环境为 Halo 商城版 2.26.1。当前商品分类编辑弹窗提供父分类、名称、别名、描述和图片,未接入元数据表单;当前分类更新参数和保存逻辑也未处理 annotations。
文章分类已经可以通过
AnnotationSetting和AnnotationsForm编辑metadata.annotations,但商城商品分类目前没有对应的编辑与保存链路。因此,只在主题中增加annotation-setting.yaml,无法让这些字段出现在商品分类编辑弹窗。目前主题采用按商品分类 ID 单独配置图标、颜色的方案,可以满足展示需求,但编辑分类外观需要再进入主题设置,维护入口比较分散。
建议
AnnotationSetting/AnnotationsForm,或提供等价的官方扩展方式。相关官方文档:
以上是本地 2.26.1 的观察。如果商城已有可用的分类元数据扩展方式,也希望补充对应文档和示例。
All reactions