Forum

Thread tagged as: Error

Nest perch include templates more than one level

Hello,

I'm trying to use perch template includes in a template that's nested one level deep. It doesn't seem to be working. My file structure is a little strange, as I'm sharing a lot of schema between an "event" and a "course". The template hierarchy looks like this:

The partials/_event-date.html template is not getting recognised at all. There's no mention of the template in the PerchDebug, no errors etc. It's definitely not getting called. Is Perch only able to nest template includes one level deep?

Short Diagnostics:

Perch Runway: 3.0.7, PHP: 7.1.0, MySQL: mysqlnd 5.0.12-dev - 20150407 - $Id: d8daadaf41e3cd81d7c6ae96c6091fd15b2c9382 $, with PDO
Server OS: Darwin, apache2handler
Installed apps: content (3.0.7), assets (3.0.7), categories (3.0.7), perch_blog (5.5.1), perch_forms (1.9), ojl_talks (1.0), perch_mailchimp (3.1), perch_twitter (3.7)
App runtimes: <?php $apps_list = array( 'content', 'categories', 'perch_blog', 'perch_twitter', 'perch_forms', 'perch_mailchimp', 'ojl_talks', 'slkt_hidden_contact' // 'perch_events', // 'ojl_events', );
PERCH_LOGINPATH: /system
PERCH_PATH: /Users/oliverlowe/Sites/slkt/wwwroot/public/system
PERCH_CORE: /Users/oliverlowe/Sites/slkt/wwwroot/public/system/core
PERCH_RESFILEPATH: /Users/oliverlowe/Sites/slkt/wwwroot/public/system/resources
Image manipulation: GD
PHP limits: Max upload 128M, Max POST 128M, Memory: 256M, Total max file upload: 128M
F1: 0c66c2e1f82f9e0b7617b2cb8270f2c7
Resource folder writeable: Yes
HTTP_HOST: slkt.dev
DOCUMENT_ROOT: /Users/oliverlowe/Sites/slkt/wwwroot/public
REQUEST_URI: /system/core/settings/diagnostics/
SCRIPT_NAME: /system/core/settings/diagnostics/index.php

Thanks

Oliver Lowe

Oliver Lowe 0 points

  • 4 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

At the moment we only go one level deep with included templates. You can't nest a sub template within another.