0

I have some templates in a group called 'client area'

they include

client_area
  - profile
  - editprofile

so these resolve to

client_area/profile
client_area/editprofile

I want edit profile to resolve to

client_area/profile/editprofile

without having to create a sub group of proifile. Is this possible?

2 Answers 2

1

I would do this by using a conditional within the client_area/profile template.

{if segment_3=='editprofile'}
    Embed your edit profile template
{if:else}
    Show the user's profile
{/if}
1
  • You might be better off using Switchee instead of the built in conditionals as this will then only parse the content of the matching condition rather than everything as the if:else will do.
    – foamcow
    Mar 22, 2014 at 17:00
0

Are you using the latest 2.8.x version of EE? If so, you should be able to use the new native Template Routing functionality to achieve this. If you're on an older version you can use the Resource Router add-on (https://github.com/rsanchez/resource_router) to do the same thing and save yourself embed overhead.

2
  • I am using 2.7.3
    – LeBlaireau
    Mar 24, 2014 at 13:26
  • So then you'd need to give the addon a shot if you wanted to try the url routing. Mar 24, 2014 at 17:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.