Jump to content

specialk

Members
  • Posts

    2
  • Joined

  • Last visited

Community Answers

  1. specialk's post in Can't get delayed output working in templates was marked as the answer   
    OK, I just read the link that I posted and that isn't what I meant to link to. I just found the documentation page that I had read earlier - http://processwire.com/docs/tutorials/default-site-profile/page3 
    We are developing using PHP 5.6 and the latest version of Processwire. We are seasoned PHP vets but new to ProcessWire and it was our understanding that having a _init.php and _main.php would lead the loading pattern of _init.php --> template.php --> _main.php and I'd rather not dig through the source code to figure out how it works / why it's not working for us. I was hoping that someone here might have some insight.
    The code I posted above should not simply output 'test' as _main.php is an entire coded design that makes use of the $variables $that $we $have $defined in _init.php and $overridden in home.php
    Basically - Why isn't PW autoloading the _init and _main files like the docs say it should? 

    See https://processwire.com/talk/topic/7743-getting-my-head-around-the-intermediate-default-profile/?p=75043 - This is EXACTLY how we have our template set up, except it doesn't actually work unless we manually include _init.php and _main.php from the template.php file, which defeats the purpose.

    And I just figured out the solution. If you want to use this style of templating, you have to update config.php's
    $config->prependTemplateFile = '_init.php'; $config->appendTemplateFile = '_main.php'; Since we started with an empty template, those variables had to be updated from their '' value to the new values.
×
×
  • Create New...