We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Segment Routing

How Do I?

spunout's avatar
spunout
10 posts
8 years ago
spunout's avatar spunout

Hey all,

I have been working with EE for a little while and just made the move to EE3 for my new website. I had a question about segment routing. I am making a website where there are numerous geographical locations (this is dynamic and more will be added over time) which all need pages and sub-pages.

www.domain.com/newyork www.domain.com/london www.domain.com/chicago www.domain.com/chicago/services www.domain.com/chicago/restaraunts www.domain.com/chicago/blog

As segment_1 refers to the location, I can’t really make template groups. I was going to do all the routing inside the home index.html:

{if segment_2 == ""} // embed the homepage for the location stipulated in segment_1

{if segment_2 == "blog"} // embed the blog for the location stipulated in segment_1

But when I try to do things like this I get 404 errors. Can I have all the template routing going through the home index.html or will I have to get more creative. Thanks!

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.