Bricks 中文文档:bricks/render_query_loop_trail

📄 原始资料  |  展开查看原始 JSON(bricks-render_query_loop_trail.json){ “name”: “bricks/render_query_loop_trail”, “kind”: “filter”, “url”: “https://academy.bricksbuilder.io/developer/hooks/filters/filter-bricks-render_query_loop_trail/”, “scraped_at”: “2026-08-29”, “hook_name”: “bricks/render_query_l…

📄 原始资料  |  展开查看原始 JSON(bricks-render_query_loop_trail.json)
{
  "name": "bricks/render_query_loop_trail",
  "kind": "filter",
  "url": "https://academy.bricksbuilder.io/developer/hooks/filters/filter-bricks-render_query_loop_trail/",
  "scraped_at": "2026-08-29",
  "hook_name": "bricks/render_query_loop_trail",
  "description": {
    "en": "The bricks/render_query_loop_trail filter controls the output of the query loop trail node in Bricks. This node is automatically added to each query loop and records the loop’s settings, which are then accessed by frontend JavaScript to manage various query-related tasks. Once these settings are read by Bricks, the node is removed from the DOM. For some third-party plugins, this node may not be needed—especially if they use custom AJAX endpoints to update query results independently of Bricks. Using this filter, you can control whether or not the query loop trail node is rendered. In this example, if the my-custom-param parameter is detected in the URL, the query loop trail node will not be rendered. This can be useful for third-party plugins with custom AJAX endpoints that handle query configurations independently.",
    "zh": "bricks/render_query_loop_trail 筛选器控制 Bricks 中查询循环跟踪节点的输出。此节点会自动添加到每个查询循环,并记录循环的设置,然后由前端 JavaScript 访问以管理各种与查询相关的任务。一旦 Bricks 读取这些设置,该节点将从 DOM 中移除。对于某些第三方插件,可能不需要此节点——特别是当它们使用自定义 AJAX 端点独立于 Bricks 更新查询结果时。使用此筛选器,你可以控制是否渲染查询循环跟踪节点。在下面的示例中,如果在 URL 中检测到 my-custom-param 参数,则不会渲染查询循环跟踪节点。这对于使用自定义 AJAX 端点独立处理查询配置的第三方插件很有用。"
  },
  "since": "1.11.1",
  "example_usage": null
}

前言

bricks/render_query_loop_trail 筛选器控制 Bricks 中查询循环跟踪节点的输出。此节点会自动添加到每个查询循环,并记录循环的设置,然后由前端 JavaScript 访问以管理各种与查询相关的任务。一旦 Bricks 读取这些设置,该节点将从 DOM 中移除。对于某些第三方插件,可能不需要此节点——特别是当它们使用自定义 AJAX 端点独立于 Bricks 更新查询结果时。使用此筛选器,你可以控制是否渲染查询循环跟踪节点。在下面的示例中,如果在 URL 中检测到 my-custom-param 参数,则不会渲染查询循环跟踪节点。这对于使用自定义 AJAX 端点独立处理查询配置的第三方插件很有用。

补充说明

更多细节可参考 官方文档