I have a 3 php files where i am trying to echo an include from a page.php to template.php but the include is another php file (Slideshow.php) it works but is positioned in the wrong place
The result needs to be like this: http://st-margarets-barking.org.uk/SchoolDay.php
the codes i have are:
template.php:
<body>
<?php echo $slideshow; ?>
</body>
page.php:
<?php
$content = "content";
$slideshow = include("Slideshow.php");
$template = "template.php";
require($template);
?>
Slideshow.php:
<?php echo "<img src='Images/slideshow-frame.png' style='position:relative; top:-20px;'>
<div class='cycle-slideshow slideshow-width' data-cycle-speed='500' data-cycle-timeout='5000'>
<img src=Images/slides/041214%20Assembly%20(5).png>
<img src=Images/slides/Evacuation-Day-001.png>
<img src=Images/slides/Trewern-002.png>
<img src=Images/slides/church-silhouette.png>
<img src=Images/slides/Evacuation-Day-003.png>
</div>";
?>
The result is this: http://st-margarets-barking.org.uk/SchoolDay0.php
I have tried:
page.php
$slideshow = "<?php include('Slideshow.php');";
However this shows a server error
I can do this:
template.php:
<?php include("Slideshow.php"); ?>
This works, but then I have to create more template.php as well as more Slideshows.php, this is not what I want to do
the point of this is to have different slideshow.php files so I can change the slideshow in the page.php, then the template.php will echo the slideshow and all other content on the page.php, this will save me time of having to change the slideshow images on each page.php
can anyone show me what I am doing wrong?