bricks_scan_links
Phase 4.7IntermediateRead OnlyComplexity: 4/10
Scan all links site-wide — detect placeholders, broken, internal/external
Overview
Scans the entire site for links in Bricks pages, templates (header/footer), and navigation menus. Returns every link found with its source, classification (internal, external, placeholder, anchor, dynamic), whether it resolves, and auto-generated suggestions for fixing placeholder links.
This is a critical Phase 4.7 tool — the #5 quality issue is stale placeholder links left after page creation. Always run this after creating pages to find and fix # links in menus, headers, and footers.
Key Features
Site-wide scanning
Scans all pages, templates (header/footer), and navigation menus
Link classification
Classifies each link as internal, external, placeholder, anchor, or dynamic
Auto suggestions
Matches placeholder button labels to real page URLs and generates fix suggestions
Filter modes
Filter by: all, placeholder, broken, internal, external
When to Use
Phase 4.7 (Link Reconciliation) — MANDATORY after creating all pages
After creating templates with placeholder links
After any page slug change or page deletion
To find broken internal links across the site
After creating templates with placeholder links
After any page slug change or page deletion
To find broken internal links across the site
Prerequisites
Pages should already be created (Phase 4 complete)
Templates should already exist (Phase 3 complete)
Templates should already exist (Phase 3 complete)
When NOT to Use
During page creation — wait until all pages exist first
To update links — use bricks_update_links after scanning
To update links — use bricks_update_links after scanning
Parameters
4 Total Parameters4 Optional
filterenumoptionalFilter results by link type
Default:
all Values: all, placeholder, broken, internal, externalpage_idsarrayoptionalScan only these page IDs (omit for all pages)
include_menusbooleanoptionalInclude navigation menu links
Default:
trueinclude_templatesbooleanoptionalInclude header/footer template links
Default:
trueCode Examples
Scan for placeholder links
Find all # and dummy links that need updating after page creation
JSON
{
"filter": "placeholder"
}Response
{"summary": {"placeholder": 8}, "links": [...], "suggestions": [{"element_id": "abc", "label": "Contact", "suggested_url": "/contact"}]}Common Mistakes
Not scanning links after creating pages
ALWAYS run bricks_scan_links(filter: "placeholder") after Phase 4 page creation, then bricks_update_links to fix stale # links
Leaving # links in menus and templates
Menus default custom URLs to #. After all pages exist, scan and replace with real URLs
Tips & Warnings
Tips & Warnings
This is the #5 quality issue: stale placeholder links. Always run after creating pages.
- Use
filter: "placeholder"to focus on dummy links - Use
filter: "broken"to find internal links that don’t resolve - The
suggestionsarray auto-matches button text to page URLs - Follow up with
bricks_update_linksto batch-fix issues
Return Values
Related Tools
Technical Details
Changelog
v1.0
Initial release
20250101