Apostrophe CMS Main Site Forum Home

Creating layout.html during tutorial fails


#1

When creating the layout.html from the steps from http://apostrophecms.org/docs/tutorials/getting-started/global.html and received the server-side error: “Error: template not found: apostrophe-pages:layout.html”

Searching didn’t find anything. I eventually continued by moving the layout.html to the root of the apostrophe-pages module, but that didn’t sit well with me.

After trying it on a fresh install, something clicked. The error was obviously from the server looking in the apostrophe-pages module, but the file was located at “lib/modules/apostrophe-templates/views/layout.html”. So I changed the {% extends "layout.html" %} in my page files to {% extends "apostrophe-templates:layout.html" %} on a hunch…and it worked!

So I assume that’s the fix, point to the module as well as the filename when extending files.