Jump to content

Recommended Posts

Posted

Hi,

I want to show only on the start page a div with some content.

I'm trying with my rudimentary php skills to construct this:

<?php if($page->isHomePage()): ?>
      <div class="xx">
        lorem ipsum
      </div>
    <?php else: ?>
  <?php endif ?>

 

Ok, I know that isHomePage will give me an error. But, is there a methods how to detect the start page and then to echo a div?

I thought about

<?php if($page->is($home)): ?>

where »home« is the template and the start page is connected with it. I'm using the older templating method. 
What would you recommend?

Thank you 

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
×
×
  • Create New...