Hi all,
Using two page list and detail for a collection, I have the below code working except for pagination. 3 articles are displayed on the listing page and 1 on the news article view from the slug.
For pagination test I have the listing only displaying 1 of possible 3 news items. But no pagination appears, template path is fine etc, any ideas?
/media-centre/news
Code
/media-centre/news/article Routing: media-centre/news/[slug:s]
Code
- if (perch_get('s')) {
- // News article
- perch_collection('News', [
- 'template' => 'news/article.html',
- 'filter' => 'news_slug',
- 'match' => 'eq',
- 'value' => perch_get('s'),
- 'count' => 1,
- ]);
- // Listing under current news article
- perch_collection('News', [
- 'template' => 'news/listing.html',
- 'sort' => '_date',
- 'sort-order' => 'ASC',
- 'count' => 3,
- ]);
- }
Using Runway 3.1.5
Show all:
paging | true |
total | 3 |
number_of_pages | 3 |
total_pages | 3 |
per_page | 1 |
current_page | 1 |
lower_bound | 1 |
upper_bound | 1 |
prev_url | |
next_url | /media-centre/news?page=2 |
prev_page_number | |
next_page_number | 2 |
first_page_url | /media-centre/news |
last_page_url | /media-centre/news |
first_page | true |
not_last_page | true |
page_links | page links here: 1 page links here: 2 page links here: 3 {...} |
perch_item_first | true |
perch_item_last | true |
perch_item_zero_index | 0 |
perch_item_index | 1 |
perch_item_rev_index | 1 |
perch_item_rev_zero_index | 0 |
perch_item_odd | |
perch_item_count | 1 |
perch_index_in_set | 1 |
perch_zero_index_in_set | 0 |
perch_first_in_set | true |
perch_namespace | perch:content |
Help greatly appreciated