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 trialjsdevtom
16,963 PointsWhat does block content do again?
I've read this, but I still don't get what it does or why.
jsdevtom
16,963 PointsGregory Katchmar, thanks for your answer. Could you tell me, to what the block content command is referring to in this video please?
Gregory Katchmar
10,912 PointsFrom the prior video, "Scaffolding Your Projectβs Templates", at 4:06: "The final thing I need in my layout file, are the block content key words. This lets jade know that any page extending the layout, can inject its HTML here". The content exists in the "layout" file and it is being injected into both the "post" and the "index" pages where the "block content" command exists. Hope this helps; it's a tricky topic, especially as no Workspaces are being used to keep a good record of all of this.
jsdevtom
16,963 PointsGregory Katchmar Thank you very much!
Gregory Katchmar
10,912 PointsGregory Katchmar
10,912 PointsThe "block [something]" command is simply a way to connect the two pages and provide the location for the text. The "content" is just a logical label to use; could just as well be "body", "main", etc.