<?php

/**
 * Snippet to test if on 1st page of multiple pages.
 *
 * THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
 * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 *
 * @package clearFusionCMS\snippet\ifFirstPage
 * @copyright Copyright (c) 2017 clearFusionCMS. All rights reserved.
 * @link http://clearfusioncms.com
 */


/* @var $tplEngine cfTemplateEngine */
$controller = $tplEngine->controller;
$route = $controller->content->getContainerRoute($controller->pageData['id'], '');
if($route->match($controller->getRequest()->getSegments()))
	echo isset($then) ? $then : '';
else if(isset($else))
	echo $else;
