Jump to content

home page uses 'basic-page' template


dev_panther
 Share

Recommended Posts

I've started a processwire project from a blank project. 

for some reason when I open my browser the page opened is not the "home.php" page, but the "basic-page.php" template. I've checked and my home page is set to use the 'home' template and not the 'basic-page' template. How do I change that?

Link to comment
Share on other sites

In the blank profile all the home.php file does is to include the basic-page:

<?php 
include("./basic-page.php"); 

So, that's the intended behaviour. If you want it to be different you'll have to add some new code to it.

Link to comment
Share on other sites

LostKobrakai: I don't know, it is possible. How do I check that. 

cstevensjr:  code of basic-page.php

<?php 
include("./inc/header.inc"); 
?>

<body>

It's the Basic Page NOT Home!!!

<!-- plugin from facebook. produced with this page: https://developers.facebook.com/docs/plugins/page-plugin -->
<div id="fb-root"></div>
<script>
	(function(d, s, id) {
  		var js, fjs = d.getElementsByTagName(s)[0];
  		if (d.getElementById(id)) return;
  		js = d.createElement(s); js.id = id;
  		js.src = "//connect.facebook.net/fr_FR/sdk.js#xfbml=1&version=v2.4";
  		fjs.parentNode.insertBefore(js, fjs);
	}(document, 'script', 'facebook-jssdk'));
</script>

<?php
  include("./inc/upper_part.inc"); 
?>

<div class="container">
	<div class="row">

		<!--facebook app box-->
		<div class="col-sm-4" style="background-color:pink;">
			<div class="fb-page" data-href="https://www.facebook.com/BambolaPuppetShow" data-small-header="false" data-adapt-container-width="true" data-hide-cover="true" data-show-facepile="false" data-show-posts="true">
				<div class="fb-xfbml-parse-ignore">
					<blockquote cite="https://www.facebook.com/BambolaPuppetShow">
						<a href="https://www.facebook.com/BambolaPuppetShow">‎באמבולה - תיאטרון בובות לילדים‎</a>
					</blockquote>
				</div>
			</div>
		</div>

		<div class="col-sm-8">

			<div class="row">

				<!--schadual box-->
				<div class="col-sm-6" style="background-color:red;">
					shows
				</div>

				<!--general info box-->
				<div class="col-sm-6" style="background-color:blue;">

					<div style='margin:auto;'>
						<?php
							echo "<img class='centered_images' src='{$page->page_image->url}' alt='{$homepage->title}'  width='100%'>";
						?>
					</div>

					<div id='main_page_text' class='hebrew_text'>
					<?php
						echo "{$page->show_description}";
					?>
					</div>
				</div>

			</div>

			<div class="row">

				<div class="col-sm-12" style="background-color:green;">
					banner
				</div>

			</div>

		</div>

	</div>


</div>

<?php include("./inc/footer.inc");?>

</body>

</html>

code of home.php

<?php 
include("./inc/header.inc"); 
?>

<body>


<?php
  include("./inc/upper_part.inc"); 
?>

<div class="container">
	<div class="row">

		<!--facebook app box-->
		<div class="col-sm-4" style="background-color:pink;">
			facebook<br>
			but <br>
			its <br>
			a <br>
			long<br>
			thing<br>
		</div>

		<div class="col-sm-8">

			<div class="row">

				<!--schadual box-->
				<div class="col-sm-6" style="background-color:red;">
					shows
				</div>

				<!--general info box-->
				<div class="col-sm-6" style="background-color:blue;">

					<div>
						<image src='{$page->page_image->url}' alt='{$homepage->title}' height='60' width='60'>
					</div>

					<div id='main_page_text'>
					<?php
						echo "{$page->show_description}";
					?>
					</div>
				</div>

			</div>

			<div class="row">

				<div class="col-sm-12" style="background-color:green;">
					banner
				</div>

			</div>

		</div>

	</div>


</div>

<?php include("./inc/footer.inc");?>

</body>

</html>

obviously they are pretty similar, since I coded home, and than I wanted to see what it looks like, so I copied it to basic-page. (They are not identical and the page that I see is basic-page.php)

Link to comment
Share on other sites

  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...