Open SarajevoNo1 opened 6 years ago
@SarajevoNo1 The ordering can be managed through the admin. As long as you've got a date block on your blog template you can then manage the ordering through the group options in the admin
Where can I find that group options exactly in admin ?!
What s the route to that im admin...
Thanks
Get Outlook for Androidhttps://aka.ms/ghei36
From: Daniel Chadwick notifications@github.com Sent: Wednesday, March 21, 2018 5:58:04 PM To: Web-Feet/coastercms Cc: SarajevoNo1; Mention Subject: Re: [Web-Feet/coastercms] Hi can you help me how to show from latest to first in blog archive page, What to change heere ? (#72)
@SarajevoNo1https://github.com/sarajevono1 The ordering can be managed through the admin. As long as you've got a date block on your blog template you can then manage the ordering through the group options in the admin
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/Web-Feet/coastercms/issues/72#issuecomment-375017122, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AatkBS_ZoV_5F7DqLnr7h6s4qHUR7OZZks5tgoabgaJpZM4Szrgl.
Hi @SarajevoNo1, it depends on your group page set up, click the group list icon
Then click the 'Edit group Settings' button:
Then you can set the order based on blocks on the post templates:
Hope that helps!
Hi can you help me how to show from latest to first in blog archive page, What to change heere ?
<?php $postDates = explode('-', Request::input('id')); $range = !empty($postDates[1]) ? 'month' : 'year'; $postDates = array_filter($postDates) + [date('Y'), '01']; try { $fromDate = \Carbon\Carbon::createFromFormat('Y-m', implode('-', $postDates))->startOfMonth(); $toDate = clone $fromDate; $toDate->modify('+1 '.$range); $pages = PageBuilder::categoryFilter('post_date', [$fromDate, $toDate], ['view' => PageBuilder::block('category_view'), 'match' => 'in', 'renderIfEmpty' => false]); $archive = ($range == 'year') ? 'Year ' . $fromDate->format('Y') : $fromDate->format('F Y'); } catch (\Exception $e) { $pages = []; $archive = 'None'; } ?>