|
| 1 | +--- |
| 2 | +title: Routes Management |
| 3 | +description: Managing Prismic routes in the Magento admin interface |
| 4 | +--- |
| 5 | + |
| 6 | +# Routes Management |
| 7 | + |
| 8 | +The module provides an admin interface for managing Prismic routes under Content > PrismicIO > Routes. |
| 9 | + |
| 10 | +## Accessing Routes |
| 11 | + |
| 12 | +1. Log into your Magento admin panel |
| 13 | +2. Navigate to Content > PrismicIO > Routes |
| 14 | +3. Here you can view and manage all Prismic routes |
| 15 | + |
| 16 | +## Managing Routes |
| 17 | + |
| 18 | +### Creating a Route |
| 19 | + |
| 20 | +1. Click "Add New Route" |
| 21 | +2. Fill in the required fields: |
| 22 | + - Title: For admin reference |
| 23 | + - Content Type: The Prismic content type (e.g., blog_post) |
| 24 | + - Route: The URL path (must start with /, e.g., /blog) |
| 25 | + - Store View: Select which store views this route applies to |
| 26 | + |
| 27 | +### Editing Routes |
| 28 | + |
| 29 | +1. Find the route in the grid |
| 30 | +2. Click "Edit" in the Action column |
| 31 | +3. Modify the route settings |
| 32 | +4. Click "Save Route" |
| 33 | + |
| 34 | +### Route Settings |
| 35 | + |
| 36 | +- **Title**: Internal reference name |
| 37 | +- **Content Type**: Matches your Prismic custom type |
| 38 | +- **Route**: URL path pattern |
| 39 | +- **Store Views**: Which stores show this content |
| 40 | +- **Status**: Enable/disable the route |
| 41 | + |
| 42 | +## URL Structure |
| 43 | + |
| 44 | +Routes define how Prismic content is accessed on your store: |
| 45 | + |
| 46 | +``` |
| 47 | +/{route}/{uid} |
| 48 | +Example: /blog/summer-fashion-trends |
| 49 | +``` |
| 50 | + |
| 51 | +## Best Practices |
| 52 | + |
| 53 | +1. **URL Structure** |
| 54 | + - Use clear, descriptive paths |
| 55 | + - Keep URLs SEO-friendly |
| 56 | + - Consider multi-store impacts |
| 57 | + |
| 58 | +2. **Content Types** |
| 59 | + - Match Prismic custom types exactly |
| 60 | + - One route per content type per store |
| 61 | + - Consider language variations |
| 62 | + |
| 63 | +3. **Store Views** |
| 64 | + - Assign routes appropriately |
| 65 | + - Consider URL conflicts |
| 66 | + - Plan for translations |
| 67 | + |
| 68 | +## Troubleshooting |
| 69 | + |
| 70 | +1. **404 Errors** |
| 71 | + - Verify route is enabled |
| 72 | + - Check store view assignment |
| 73 | + - Confirm content type exists |
| 74 | + |
| 75 | +2. **URL Conflicts** |
| 76 | + - Check for duplicate routes |
| 77 | + - Review store view assignments |
| 78 | + - Verify URL patterns |
| 79 | + |
| 80 | +3. **Content Not Showing** |
| 81 | + - Validate content type name |
| 82 | + - Check store view settings |
| 83 | + - Review route status |
0 commit comments