Jump to content

Yipper

Starter
  • Posts

    1
  • Joined

  • Last visited

Everything posted by Yipper

  1. Hi everyone, I just started using ProcessWire this weekend and try to get an overview over everything. I'm a bit confused about output strategies and markup regions, because I saw a lot of different approaches and couldn't really tell which the current recommended one is. Somehow I ended up like this: _main.php <body class=""> <!-- Header --> <?php include "_header.php"; ?> <!-- Navigation --> <?php include "_navigation.php"; ?> <!-- Main --> <main class=""> <?= $content ?> </main> <!-- Footer --> <?php include "_footer.php"; ?> </body> _header.php - ..and on the other layout _*.php files, just using HTML inline php like this: <header class=""> <a href="<?= $home->url; ?>"> </a> </header 1-home.php for the home page template 2-about.php for an about page template - numbered for better overview - using $content .="" for markup regions <?php namespace ProcessWire; $content .= "<h1 class=''>{$page->title}</h1>"; $content .= "<div class=''>{$page->introduction}</div>"; 1. Can you please tell me if this is a good way (in late 2024) to structure templates? 2. A problem that I have with the $content .="" approach is that code highlighting and automatic code formatting doesn't really work in VS Code for me then (could be a setup problem). Thanks in advance for tips and best practices
×
×
  • Create New...