Hello everyone, I am new to processwire and this is my first post. I am coming from the modx world, and I am unfortunately really bad in php. Nonetheless after silently reading here for a few weeks I think that processwire might be just the right cms for my needs. At the moment I am doing a website for a musician and I will probably have quite a few beginner questions. Thanks for your help and patience in advance Thomas
*********************************************************
Here is my first question:
My pages have basically the same layout, so I would like to have only one template file. But there will be a few extras on certain pages, like one page with a calendar and one with an audio player.
I thought it would be wise to put the code for the audio player or the calendar in an external file or page to keep my template file simple to read. To do this I tried to "echo" or "include" an external php file, but the php didn' t get processed.
<?php
if ($page->id == 1032)//home
{echo "<h2>Welcome...</h2>";}
elseif ($page->id == 1017)//dates
{echo "how to include external code here?";}
?>
Is there a processwire way to do this and is this in general a good approach?
Thomas
PS: I read the different modx threads already.