Jump to content

Landing page exclude from prepend and append config entry


kaz
 Share

Recommended Posts

I have a website with a landing page. The layout of the content pages has

$config->prependTemplateFile = 'views/partials/_prepend.php';
$config->appendTemplateFile = 'views/partials/_append.php';

The layout of the landing page template is completely different, with a different header and footer structure. Because it's only one template / one page, I don't need an entry in the config.

I'm figuring out how to solve this? The entry in the config assigns the prepend and append file to all pages?

It would be great if the template landing.php does not have a prepend and append file assigned to it. Is that feasible?

Link to comment
Share on other sites

<?php
if($page->id == **YOURLANDINGPAGEID**)
	return;
?>

Just Add this to the top of your _prepend.php and _append.php (and isert your id ?)

Of course, this also works with a template check:

<?php
if($page->template == "**yourtemplatename**")
	return;
?>

 

  • Like 1
Link to comment
Share on other sites

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...