Prettyifing the code, previously there was a bad indentation.
issue #11
This commit is contained in:
parent
66f9dbab26
commit
4c4541e15c
48
php/home.php
48
php/home.php
@ -23,34 +23,34 @@
|
|||||||
|
|
||||||
<!-- Pagination -->
|
<!-- Pagination -->
|
||||||
<ul class="pagination">
|
<ul class="pagination">
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$isPage = $WHERE_AM_I === 'page';
|
$isPage = $WHERE_AM_I === 'page';
|
||||||
$isHome = $WHERE_AM_I === 'home';
|
$isHome = $WHERE_AM_I === 'home';
|
||||||
$pageHandler = new Pages();
|
$pageHandler = new Pages();
|
||||||
$previousLink = null;
|
$previousLink = null;
|
||||||
$nextLink = null;
|
$nextLink = null;
|
||||||
$areTherePages = !!count($content);
|
$areTherePages = !!count($content);
|
||||||
if ( $isPage && $areTherePages ) {
|
if ( $isPage && $areTherePages ) {
|
||||||
$currentPage = $content[0];
|
$currentPage = $content[0];
|
||||||
if( isset($currentPage) ) {
|
if( isset($currentPage) ) {
|
||||||
if ( $currentPage->previousKey() ) {
|
if ( $currentPage->previousKey() ) {
|
||||||
$previousLink = buildPage($currentPage->previousKey())->permalink();
|
$previousLink = buildPage($currentPage->previousKey())->permalink();
|
||||||
}
|
}
|
||||||
if ( $currentPage->nextKey() ) {
|
if ( $currentPage->nextKey() ) {
|
||||||
$nextLink = buildPage($currentPage->nextKey())->permalink();
|
$nextLink = buildPage($currentPage->nextKey())->permalink();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
if ( $isHome ) {
|
||||||
if ( $isHome ) {
|
if ( Paginator::showPrev() ) {
|
||||||
if ( Paginator::showPrev() ) {
|
$previousLink = Paginator::previousPageUrl();
|
||||||
$previousLink = Paginator::previousPageUrl();
|
}
|
||||||
|
if ( Paginator::showNext() ) {
|
||||||
|
$nextLink = Paginator::nextPageUrl();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if ( Paginator::showNext() ) {
|
?>
|
||||||
$nextLink = Paginator::nextPageUrl();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
<?php if ( isset($previousLink) ): ?>
|
<?php if ( isset($previousLink) ): ?>
|
||||||
<li class="float-left">
|
<li class="float-left">
|
||||||
<a href="<?php echo htmlentities( $previousLink, ENT_QUOTES | ENT_HTML401 ); ?>">
|
<a href="<?php echo htmlentities( $previousLink, ENT_QUOTES | ENT_HTML401 ); ?>">
|
||||||
|
Loading…
Reference in New Issue
Block a user