Join us for EEConf 2023, October 4-5 in Orlando. Speakers. Networking. Community powered. Awesome.

Join us for EEConf 2023, October 4-5 in Orlando.

Register Now!

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

Trying to understand EE routing/templating

How Do I?

rtixweb's avatar
rtixweb
9 posts
3 months ago
rtixweb's avatar rtixweb

I’m just barely getting started with EE and I’ve been thrown in the deep end by inheriting a large, old EE3-based site that needs some work. It uses the Construct plug-in, which might be relevant to my question.

I have an entry on the site with slug “business-office”, and I have a template html file in the backend named boffice.html. Changes made in boffice.html show up on the site on entry “business-office”. All good so far.

What I don’t understand, and haven’t been able to discover, is how the template and entry are connected. I don’t see anything in the entry options for “business-office” to specify a template. In Template manager, I can see a “site/boffice” template, but it doesn’t specify “business-office” in any way that I can see. Likewise in the Construct plugin, I see a similar template entry to the EE template, presumably to tie together the EE template to the Construct template, but again, no direct reference to “business-office”. This template is specific to this one entry. There are many entries on the site with this same 1-to-1 setup.

How does EE know to use the boffice.html template with this entry? To take it a step further, how would I make a new entry tied to a new template which was set up in the same manner?

       
jelle's avatar
jelle
64 posts
3 months ago
jelle's avatar jelle

I think this is because of Template routes. If you go into the template manager, the last option on the left: /cp/design/routes

more info https://docs.expressionengine.com/latest/templates/routes.html

       
rtixweb's avatar
rtixweb
9 posts
about 3 months ago
rtixweb's avatar rtixweb

Thank you for the reply. Unfortunately neither your post nor the docs cleared things up for me. In the Template Routes area of my site, I see a “site/boffice” template listed, but the route field is empty. I still don’t see how the “site/boffice” template and the “business-office” entry are connected.

       
jelle's avatar
jelle
64 posts
about 3 months ago
jelle's avatar jelle

What does the site/boffice template look like? It might be hardcoded in some way. Also it might be helpfull to turn on template debugging. it’s somewhere in the settings / the developer menu. Can’t remember for EE3. However, this should show you debugging information on the bottom of your page (frontend), and it should also show you what template is loaded and maybe how it’s set up

       
rtixweb's avatar
rtixweb
9 posts
about 3 months ago
rtixweb's avatar rtixweb

Finally found it. That was harder than it should have been. The association between entry and template can be set while editing the Construct navigation/tree settings for the menu node which corresponds to the entry.

       

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.