Jump to content

JoelB95

Members
  • Posts

    2
  • Joined

  • Last visited

JoelB95's Achievements

Newbie

Newbie (2/6)

0

Reputation

  1. Additional info: I understand that all content has to be inside the page-content id, but this is just an example. If echo 'test' at the top of my _main file or in my _func file, the same thing happens.
  2. Hi everyone, I'm new to processwire and I'm trying to figure some things out. I really like the idea of markup regions but everytime I end up with some double executed PHP scripts. This is in my config.php $config->useMarkupRegions = true; $config->appendTemplateFile = '_main.php'; This is the markup element in my _main.php <div id="page-content"> <!-- Fill content --> </div> This my overview.php template <?= 'test' ?> <div id="page-content"> <h1><?=$page->title?></h1> Overview page </div> If I add some php code to the _main.php or overview.php template, it will be executed twice. For example, like in overview.php, when I echo 'test' at the top of this file, it will output testtest at the top of my page (I added a screenshot). However, the page title will only display once. I also had this problem in my _func.php file. I do not really understand where I have to include my _func.php file now, while using markup regions. In the config or main? Or somewhere else? Can anyone help me into the right direction? Thanks!
×
×
  • Create New...