$page->isHomePage()

Checks if the page is the home page

  • return (boolean)

Example

A custom title for the homepage

<?php if($page->isHomePage()): ?>
<title>Welcome to my website</title>
<?php else: ?>
<title><?php echo html($page->title() . ' / ' . $site->title()) ?></title>
<?php endif ?>