Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial


hector alvarado
hector alvarado
15,796 Points

What process the template??

I don't understand clearly the flow of the template. So you create a template and the render() function make the code readable for the browser right??

  1. So if change the argument of the render file on the function, I could render any html file??
  2. If If i want to render another website i've made, I would need to make it on a template?

1 Answer

Chris Freeman
Chris Freeman
Treehouse Moderator 68,423 Points

The render function formats the HTML to be sent as an HTTP response. This can be a HTML file directly, or it can be a template file in HTML format with placeholders that use context data from the render function to produce unique HTML. This flow is very flexible and can use any HTML / template combination.

Templates and HTML files are usually kept separately for each website, but nothing prevents using files from one website to create pages for another website.

Post back if you have further questions. Good luck!