Hey there, the subject might be a little vague, let me explain:
<a href="https://expressionengine.com/products">{category_name}</a>
Generates this URL:
http://test.dev/index.php/products/category/test-category
However, what I’d like to do is use the {category_url_title} as the second segment instead of category, so it would look like this:
http://test.dev/index.php/products/test-category
I’d also like to achieve this with single entries, as well:
http://test.dev/index.php/products/product_url_title
My structure is basically this:
| product.group
| - - index.html
| products.group
| - - index.html
| - - category.html
But I’d like to group all of the above in the products.group template group if possible, so that I could have a structure like this, for example:
| products.group
| - - index.html
| - - category.html
| - - product.html
Without having to use the /category/ or /product/ segments in the URL.
Does that make sense?
You can reduce your amount of templates using conditionals and combining more than one view into a single template: https://docs.expressionengine.com/latest/templates/conditionals.html
Template Routes may also provide you some of the functionality you want in the URLs: https://docs.expressionengine.com/latest/urls/template_routes.html
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.