Generate documentation for Vvveb CMS admin > site settings > routes settings tab from the screenshot Routes are used to map url structure to cms modules, by default it has a seo friendly configuration where /slug is used for posts and /page/slug is used for pages. Sometimes for sites that are not blog centric a different structure might be needed where /slug route must be used for pages instead of posts and this can be changed by using custom routes and changing page route rule.
The Routes tab in Site Settings controls how URLs are mapped to CMS modules such as posts, pages, products, categories, and plugin modules.
Routes define the structure of your site’s URLs and determine which module handles a given request.
By default, Vvveb CMS uses SEO‑friendly routes optimized for blog‑centric websites.
However, these rules can be customized to support different site structures, landing‑page‑focused sites, ecommerce stores, or fully custom URL patterns.
1. Purpose of Routes
Routes determine:
- Which module handles a URL
- How slugs are interpreted
- Whether
/slugrefers to a post or a page - How pages, posts, categories, products, and custom modules are accessed
- Whether URLs include prefixes such as
/page/,/post/,/product/, etc.
This system allows full control over URL design and SEO structure.
2. Default Routing Behavior
Vvveb CMS ships with a clean, SEO‑friendly routing configuration:
Default Rules
| URL Pattern | Module |
|---|---|
/slug |
Post |
/page/slug |
Page |
/category/slug |
Category |
/product/slug |
Product (if ecommerce enabled) |
This structure is ideal for ecommerce and blog first websites where posts are the primary content type.
3. When to Customize Routes
Some websites are not blog‑centric and require a different URL structure.
For example:
- Corporate websites where pages are the main content
- Landing‑page‑driven sites
- Documentation sites
- Ecommerce stores where posts are secondary
- Sites that want
/slugto always load a page, not a post
In these cases, you can override the default routing rules.
4. Custom Route Rules
The Routes tab allows you to:
- Change which module handles a specific URL pattern
- Reassign
/slugfrom posts to pages - Add or remove prefixes
- Create custom URL structures
- Override or disable default routes
- Add new routes for custom modules or plugins
Example: Using /slug for Pages Instead of Posts
To make /about, /contact, /services load pages instead of posts:
- Open Routes tab
- Locate the page route rule
- Change its pattern to:
/{slug} - Update the post route to use a prefix, for example:
/blog/{slug}
This instantly transforms the site into a page‑centric structure.
5. Route Rule Structure
A route rule typically includes:
- Pattern — URL structure (e.g.,
/page/{slug}) - Module — Which CMS module handles the request
- Controller/Action — Optional advanced mapping
- Parameters — Extracted from the URL (e.g.,
{slug},{id}) - Priority — Determines which rule is matched first
Common Parameters
| Parameter | Meaning |
|---|---|
{slug} |
Page or post slug |
{id} |
Numeric ID |
{category} |
Category slug |
{product} |
Product slug |
{lang} |
Language code (if multilingual routing enabled) |
6. Best Practices
-
Avoid route conflicts
Ensure no two routes match the same pattern. -
Keep URLs short and meaningful
Good for SEO and user experience. -
Use prefixes for clarity
/blog/slug,/docs/slug,/shop/product -
Test routes after changes
Incorrect routing can break navigation. -
Use
{slug}for human‑readable URLs
Avoid exposing numeric IDs unless necessary.
Summary
The Routes Tab allows you to:
- Control URL structure
- Map URLs to posts, pages, products, and custom modules
- Override default blog‑centric routing
- Create page‑centric or custom routing systems
- Improve SEO and user experience through clean URLs
This flexibility makes Vvveb CMS suitable for blogs, corporate sites, ecommerce stores, landing pages, and fully custom applications.