如何使用 Adobe Experience Manager 的 QueryBuilder 获取节点的内容
How to get content the content of a node using the QueryBuilder of Adobe Experience Manager
假设我有一个节点 /etc/designs/blog/css/static.css
目前我只实现了这个:
{
success: true,
results: 1,
total: 1,
offset: 0,
hits: [
{
path: "/etc/designs/blog/css/static.css/jcr:content",
name: "jcr:content",
title: "jcr:content",
lastModified: "2011-02-18 12:28:12",
size: "12 KB",
mimeType: "text/css"
}
]
}
通过调用此 url:http://www.example.com/bin/querybuilder.json?path=/etc/designs/blog/css/static.css
。
是否可以使用QueryBuilder获取节点的内容?
您可以通过添加 p.hits=full
来完成此操作。例如:
此用法在此处有详细说明:https://docs.adobe.com/docs/en/cq/5-6-1/dam/customizing_and_extendingcq5dam/query_builder.html#Refining%20What%20Is%20Returned 说明:
Refining What Is Returned
By default, the QueryBuilder JSON Servlet will return a default set of
properties for each node in the search result (e.g. path, name, title,
etc.). In order to gain control over which properties are returned,
you can do one of the following:
Specify p.hits=full, in which case all properties will be included for
each node:
http://localhost:4502/bin/querybuilder.json?p.hits=full&property=jcr%3atitle&property.value=Triangle
假设我有一个节点 /etc/designs/blog/css/static.css
目前我只实现了这个:
{
success: true,
results: 1,
total: 1,
offset: 0,
hits: [
{
path: "/etc/designs/blog/css/static.css/jcr:content",
name: "jcr:content",
title: "jcr:content",
lastModified: "2011-02-18 12:28:12",
size: "12 KB",
mimeType: "text/css"
}
]
}
通过调用此 url:http://www.example.com/bin/querybuilder.json?path=/etc/designs/blog/css/static.css
。
是否可以使用QueryBuilder获取节点的内容?
您可以通过添加 p.hits=full
来完成此操作。例如:
此用法在此处有详细说明:https://docs.adobe.com/docs/en/cq/5-6-1/dam/customizing_and_extendingcq5dam/query_builder.html#Refining%20What%20Is%20Returned 说明:
Refining What Is Returned
By default, the QueryBuilder JSON Servlet will return a default set of properties for each node in the search result (e.g. path, name, title, etc.). In order to gain control over which properties are returned, you can do one of the following:
Specify p.hits=full, in which case all properties will be included for each node:
http://localhost:4502/bin/querybuilder.json?p.hits=full&property=jcr%3atitle&property.value=Triangle