Maybe Im not thinking this fully, but here is the issue. My “old” website has a URL structure as:
www.mysite.com/products/product-1
www.mysite.com/products/product-2
www.mysite.com/products/product-3
and so on….
I am now building the new site, and am trying to keep the URL structure intact as much as possible to eliminate broken URLs. I would like to keep one channel for all products and generate this dynamically. I dont want to have to create a page template per.
My logic, or rather, what I am used to in EE is something such as:
www.mysite.com/products/detail/product-1
www.mysite.com/products/detail/product-2
www.mysite.com/products/detail/product-3
This would be the basic “master/detail” page setup
Note, this system is on windows iis, and I have zero experience on any URL rewrites.
What/how would I go about achieving the result above (www.mysite.com/products/product-1) in EE?
There are probably better answers here, but I’ve always just had to use conditionals that trigger off of the url and store templates that embed the same single page containing all of the conditionals…
Example, index holds all HTML including the EE conditionals for URL segments (if segment_2==”x”, last_segment==”y”, etc). Then “x” and “y” are named templates in that same template group that contain the same embed tag: embed=”group/index”.
That way, I never have to code more than one page, and I can use URLs for if/then triggers…
Hopefully that’s less confusing than it sounds…
-Tony
actually… let me take a few steps forward here.
We are adding the detail page… but after products/product name.
Example: Old URL: www.mysite.com/product/my-product
New url: www.mysite.com/product/my-product/details
So we need the similar url as the old, but with the addition of the detail. make sense?
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.