模版装修-得到可装修页面类型信息

主题 Liquid - 获取页面类型选择列表

获取 DIY 主题装修中可编辑的页面类型列表。返回数据按系统分区组织,每项包含页面 code、显示名称、预览 URL,以及可选的自定义布局子列表(childs)。

接口信息

  • 接口地址: {your-site-url}/api/skill/theme-liquid/get-page-type-select
  • 基础 URL: {your-site-url} 需替换为你自己的独立站 URL 地址,如 https://your-domain.com/apimanager666
  • 请求方式: GET

认证

请求头中需要携带 skill-access-token

Header
skill-access-token {your-skill-access-token} (请替换为你自己的 token)

请求参数 (Query)

字段 类型 必填 说明
theme_identity string 主题标识,如 new_default_theme
theme_id string 主题 ID

请求示例

cURL

curl --location --request GET '{your-site-url}/api/skill/theme-liquid/get-page-type-select?theme_identity=new_default_theme&theme_id=832' \
--header 'skill-access-token: {your-skill-access-token}'

返回结果

code200 表示调用成功;code 不为 200 表示调用失败。

成功响应

{
    "code": 200,
    "data": [
        [
            {
                "code": "home",
                "text": "首页",
                "url": "https://diydomain.fecmall.cn"
            },
            {
                "code": "product",
                "text": "商品详情页",
                "url": "https://diydomain.fecmall.cn/products/my-test-product-title",
                "childs": [
                    "product",
                    "product.custom-layout-1",
                    "product.custom-layout-2",
                    "product.full-width-slider",
                    "product.grid-1-column",
                    "product.grid-2-columns"
                ]
            },
            {
                "code": "collection",
                "text": "商品专辑页",
                "url": "https://diydomain.fecmall.cn/collections/321432",
                "childs": [
                    "collection",
                    "collection.canvas-sidebar",
                    "collection.filter-left-sidebar",
                    "collection.full-width",
                    "collection.grid-2-columns",
                    "collection.grid-3-columns",
                    "collection.grid-4-columns"
                ]
            },
            {
                "code": "list-collections",
                "text": "专辑列表页",
                "url": "https://diydomain.fecmall.cn/collections"
            }
        ],
        [
            {
                "code": "cart",
                "text": "购物车",
                "url": "https://diydomain.fecmall.cn/cart"
            },
            {
                "code": "checkout",
                "text": "订单结账页",
                "url": "https://diydomain.fecmall.cn/checkout/AA11613193359294"
            }
        ],
        [
            {
                "code": "page",
                "text": "自定义页",
                "url": "https://diydomain.fecmall.cn/pages/11111",
                "childs": [
                    "page",
                    "page.about-us",
                    "page.faqs",
                    "page.find-a-store"
                ]
            },
            {
                "code": "blog_collection",
                "text": "博客专辑",
                "url": "https://diydomain.fecmall.cn/blogs/blog-article-title",
                "childs": ["blog_collection", "blog_collection.grid", "blog_collection.list"]
            },
            {
                "code": "blog_article",
                "text": "博客文章",
                "url": "https://diydomain.fecmall.cn/blog/d8rp835p70",
                "childs": ["blog_article", "blog_article.left-menu"]
            },
            {
                "code": "contacts",
                "text": "Constact",
                "url": "https://diydomain.fecmall.cn/contacts"
            }
        ],
        [
            {
                "code": "search",
                "text": "搜索页面",
                "url": "https://diydomain.fecmall.cn/search?q="
            },
            {
                "code": "not_found",
                "text": "404页",
                "url": "https://diydomain.fecmall.cn/notfound"
            }
        ]
    ],
    "message": "success"
}

返回字段说明

字段 类型 说明
code Number 状态码,200 表示成功
message String 执行结果的文字描述
data Array[Array] 页面类型分组列表。外层数组的每个元素是一个分组

data 分组 → 页面项字段

字段 类型 说明
code string 页面类型编码,用于 page_type 参数。如 homeproductcollection
text string 页面类型显示名称
url string 页面预览链接
childs Array[string] 可选,该页面可用的自定义布局模板列表。第一个元素为默认布局(等于 code),后续为 code.模板名 格式

页面分组概览

第一组:主要页面

code 名称 是否有自定义布局
home 首页
product 商品详情页
collection 商品专辑页
list-collections 专辑列表页

第二组:购物流程

code 名称 是否有自定义布局
cart 购物车
checkout 订单结账页

第三组:内容页面

code 名称 是否有自定义布局
page 自定义页
blog_collection 博客专辑
blog_article 博客文章
contacts Contact

第四组:其他页面

code 名称 是否有自定义布局
search 搜索页面
not_found 404 页

注意事项

  1. data 是二维数组 — 外层为分组,内层为具体页面项。分组与 DIY 编辑器中的区域选择对应
  2. code 即为 模版装修-得到可以增加的section列表page_type 参数值
  3. childs 中的值格式为 page_type.模板名,选择不同布局模板后,相同 page_type 下可用不同的 sections 组合
  4. childs 第一项始终等于 code,表示该页面的默认布局
  5. url 为店铺实际预览链接,可直接用于编辑器中的"预览"功能
Copyright © fecify.com 2025 all right reserved,powered by Gitbook该文件修订时间: 2026-06-09 11:46:04

results matching ""

    No results matching ""