Pathfinder: How to use URL Strategy setting
The Pathfinder section allows you to control how button links are generated based on user selections. This guide explains each URL strategy and how to configure them.
URL Strategy Options
1. Collection Handle (Default)
What it does: Combines all selected option IDs into a single collection handle, separated by hyphens.
Configuration:
URL Strategy: Select "Collection handle"
Collection Base URL: Enter the base path (default:
/collections)
How it works:
Selected options:
women→tops→blackGenerated URL:
/collections/women-tops-black
Best for:
Stores with a structured collection naming system
Multi-level collection hierarchies
When you have pre-created collections for each combination
Example setup:
Collection Base URL: /collections
Option IDs: women, tops, black
Result: /collections/women-tops-black2. Search Query
What it does: Creates a product search URL using the option names as search terms.
Configuration:
URL Strategy: Select "Search query"
No additional settings required
How it works:
Selected options:
Women→Tops→BlackGenerated URL:
/search?q=Women+Tops+Black&type=product
Best for:
Stores without pre-structured collections
When you want to search across all products
Dynamic filtering based on product titles/descriptions
Example:
Option Names: Women, Tops, Black
Result: /search?q=Women%20Tops%20Black&type=product3. Tagged Collection
What it does: Links to a base collection filtered by product tags.
Configuration:
URL Strategy: Select "Tagged collection"
Base Collection Handle: Enter the main collection to filter (default:
all)
How it works:
Selected options:
women→tops→blackGenerated URL:
/collections/all/women+tops+black
Best for:
Filtering a single large collection by tags
Using Shopify's native tag filtering
When all products are tagged consistently
Example setup:
Base Collection Handle: all-products
Option IDs: women, tops, black
Result: /collections/all-products/women+tops+black4. Custom Pattern
What it does: Allows you to define your own URL structure using placeholders.
Configuration:
URL Strategy: Select "Custom pattern"
Custom URL Pattern: Enter your pattern with placeholders
Available placeholders:
{1},{2},{3}- Option IDs by position{layer1},{layer2},{layer3}- Option IDs by layer name{name1},{name2},{name3}- Option names (URL encoded)
How it works:
Pattern:
/products/{layer1}?category={layer2}&color={layer3}Selected:
women→tops→blackGenerated:
/products/women?category=tops&color=black
Best for:
Custom page structures
Advanced URL parameters
Integration with custom apps or filters
Non-standard routing
Examples:
Product page with variants:
Pattern: /products/{1}?variant={2}&color={3}
Result: /products/women?variant=tops&color=blackCustom pages:
Pattern: /pages/{layer1}-{layer2}-collection
Result: /pages/women-tops-collectionQuery parameters:
Pattern: /collections/all?gender={1}&type={2}&color={3}
Result: /collections/all?gender=women&type=tops&color=blackMixed structure:
Pattern: /shop/{name1}/{layer2}?filter={layer3}
Result: /shop/Women/tops?filter=blackSetup Workflow
Step 1: Choose Your Strategy
Consider your store structure:
Pre-built collections? → Use "Collection handle"
Tag-based filtering? → Use "Tagged collection"
Simple search? → Use "Search query"
Custom needs? → Use "Custom pattern"
Step 2: Configure Settings
Based on your chosen strategy, fill in the required fields in the section settings under "🔗 URL Strategy"
Step 3: Set Option IDs
For each option in your pathfinder layers:
Go to the option block settings
Set the Option ID field (e.g.,
women,tops,black)Use lowercase, no spaces (use hyphens if needed)
Keep them consistent with your collections/tags
Step 4: Test Your URLs
Preview the section
Make selections through all layers
Check the generated button URLs
Verify they point to the correct pages
Common Use Cases
Fashion Store with Collections
Strategy: Collection Handle
Base URL: /collections
Layers: Gender → Category → Color
Option IDs: women, tops, black
Result: /collections/women-tops-blackGeneral Store with Search
Strategy: Search Query
Layers: Category → Feature → Price Range
Option Names: Kitchen, Non-Stick, Under $50
Result: /search?q=Kitchen+Non-Stick+Under+$50&type=productTagged Product Catalog
Strategy: Tagged Collection
Base Collection: all-products
Layers: Room → Style → Color
Option IDs: bedroom, modern, blue
Result: /collections/all-products/bedroom+modern+blueCustom Implementation
Strategy: Custom Pattern
Pattern: /collections/{1}?filter.v.option.{2}={3}
Layers: Collection → Option Name → Value
Result: /collections/clothing?filter.v.option.size=largeTips & Best Practices
Keep IDs consistent: Use the same naming convention across collections, tags, and option IDs
Test thoroughly: Verify URLs work before publishing
Use lowercase: Avoid issues with case-sensitive URLs
No special characters: Stick to letters, numbers, and hyphens in option IDs
Plan ahead: Map out your URL structure before setting up the pathfinder
Document your pattern: If using custom patterns, keep notes on the structure
Troubleshooting
URLs not working?
Check that option IDs match your collection/tag handles exactly
Verify collections exist in your store
Test URLs manually in the browser
Wrong pages loading?
Review option ID spelling and case
Confirm collection base URL is correct
Check that tags are applied to products
Custom pattern not generating?
Ensure placeholders are correct (
{1},{layer1}, etc.)Verify pattern syntax (no typos in curly braces)
Test with simpler patterns first
Last updated