4

I've seen this question in Google but the link ended up dead on the Ellislab page.

I have a not too big site which resides all in one template group.

Is it possible to remove the template group from the url so instead of http://domain.com/site/contact it should be http://domain.com/contact

I already stripped the index.php via .htaccess

I once removed the template folder by linking to subpages with: {path='contact'} instead of {path='site/contact'} but I'm not sure if this is a good practice and doesn't mess up the site in one way or another.

4

Few days ago there was a question about Strict URLs in EE, enabling Strict url you have option to link directly to template jumping over template_group What does "Enable Strict URLs" really mean? does this solves your issue?

1
  • Thanks this url_schematic does really lighten up some things.
    – KSPR
    Nov 30 '12 at 10:30
2

Using {path=contact} to link to a template in site/contact is definitely a safe practice. Is it a "good" practice? There's no real downside to it, so I'd say yes.

There's also nothing 'bad' about having multiple template groups (within reason!), so you could also use contact/index as your template and link to it with {path=contact}

1
  • I guess your right. If I compare the behaviour of the links in the url schematic this should not cause any problem.
    – KSPR
    Nov 30 '12 at 10:31
0

The default template group should not be showing in the first segment. Has this been set for the site template group?

Typically on small sites I just hard code the main navigation.

1
  • 1
    It will do if you've got 'enable strict URLs' on.
    – Tyssen
    Nov 29 '12 at 21:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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