I've used
Code: Select all
if ($WHERE_AM_I == 'page') {
if ($page->slug() == 'news') {
include(THEME_DIR_PHP.'news.php');
} else {
include(THEME_DIR_PHP.'page.php');
}
} else {
include(THEME_DIR_PHP.'home.php');
}
My news.php is basically copied from home.php but I just removed the code for featured posts.
Code: Select all
<!-- Begin Site Title
================================================== -->
<div class="container">
<div class="mainheading">
</div>
<!-- End Site Title
================================================== -->
<!-- Begin List Posts
================================================== -->
<section class="recent-posts">
<div class="section-title">
<h2><span><?php ($WHERE_AM_I=='search'?$language->p('Search'):$language->p('Aktualności')) ?></span></h2>
</div>
<div class="card-columns listrecent">
<?php if (empty($content)) { $language->p('No pages found'); } ?>
<?php foreach ($content as $page): ?>
<!-- begin post -->
<div class="card">
<a href="<?php echo $page->permalink(); ?>">
<div style="background-image:url(<?php echo ($page->coverImage()?$page->coverImage():Theme::src('img/noimage.png')) ?>); background-size: cover; background-position: center; width:100%; height:250px;"></div>
</a>
<div class="card-block p-3">
<div class="metafooter">
<div class="wrapfooter">
<span class="author-meta">
<span class="post-date"><?php echo $page->date(); ?></span><span class="post-read"></span>
</div>
</div>
<h2 class="card-title"><a href="<?php echo $page->permalink(); ?>"><?php echo $page->title(); ?></a></h2>
<h4 class="card-text"><?php echo (empty($page->description())?$language->p('uzupełnił opis aktualności'):$page->description()) ?></h4>
</div>
</div>
<!-- end post -->
<?php endforeach ?>
</div>
</section>
<!-- End List Posts
================================================== -->
<?php if (Paginator::numberOfPages()>1): ?>
<nav aria-label="Page navigation example">
<ul class="pagination justify-content-center">
<?php if (Paginator::showPrev()): ?>
<li class="page-item"><a class="page-link" href="<?php echo Paginator::previousPageUrl() ?>" tabindex="-1">◀ <?php $language->p('Previous page') ?></a></li>
<?php endif ?>
<?php if (Paginator::showNext()): ?>
<li class="page-item"><a class="page-link" href="<?php echo Paginator::nextPageUrl() ?>"><?php $language->p('Next page') ?> ►</a></li>
<?php endif ?>
</ul>
</nav>
<?php endif ?>
<!-- Begin Footer
================================================== -->
<div class="footer">
<p class="pull-left">
<?php echo $site->footer(); ?>
</p>
<p class="pull-right">
Zachodniopomorskie Centrum Kształcenia Zawodowego i Ustawicznego w Szczecinie |
made by <a target="_blank" href="">Ganbaru</a>
</p>
<div class="clearfix">
</div>
</div>
<!-- End Footer
================================================== -->
</div>
<!-- /.container -->
Here are the links
homepage url http://zckziu.pl/nowa
news url http://zckziu.pl/nowa/news
any idea how to make it work ?
or another way to create a custom page to list posts just from one category ?
Thanks
Ari