mageworx / module-htmlsitemap-graph-ql
不适用
1.0.0
2020-10-19 11:03 UTC
Requires
- magento/framework: >=102.0.0 < 104
- mageworx/module-htmlsitemap: >= 2.4.1
This package is auto-updated.
Last update: 2024-09-17 19:18:55 UTC
README
为 Mageworx Magento 2 SEO Suite Ultimate 扩展提供的 GraphQL API 模块。
安装
1) 复制粘贴方法
- 下载此模块并将其上传到
app/code/MageWorx/HtmlSitemapGraphQl
目录 (如果不存在,请先创建 "HtmlSitemapGraphQl" 目录)
2) 使用 composer(从 Packagist)安装
- 执行以下命令:
composer require mageworx/module-htmlsitemap-graph-ql
如何使用
HtmlSitemapGraphQl 模块允许显示 HTML 网站地图
语法:
products(
search: String
filter: ProductAttributeFilterInput
pageSize: Int
currentPage: Int
sort: ProductAttributeSortInput
): Products
查询包括以下属性
- meta_description
- meta_keywords
- categories
- cms_pages
- additional_links
- custom_links
请求
{mwHtmlSitemap (storeId: 1) {
categories {
items {
title
url
level
}
}
}
}
响应
{
"data": {
"mwHtmlSitemap": {
"categories": {
"items": [
{
"title": "What's New",
"url": "https://store_url/default/what-is-new.html",
"level": 2
},
{
"title": "test",
"url": "https://store_url/default/test.html",
"level": 2
}
]
}
}
}
}