Archive
Hi,
I would like to create an archive for blog posts using pdotools. I want to display the archives in the following format.
I need some guidelines regarding,
Thanks.
I would like to create an archive for blog posts using pdotools. I want to display the archives in the following format.
- Year (Counts)
- Months (Counts)
- Blog Posts
- Blog Posts
I need some guidelines regarding,
- Which tools is best to achieve the above format pdoMenu or pdoResources?
- How to filter the blog posts by year and month?
Thanks.
Комментарии: 11
Авторизуйтесь или зарегистрируйтесь, чтобы оставлять комментарии.
1. Get all resources
2. Loop through them
3. Get their createdon, split to year and month, than and into such array
4. Loop through this array and template it
5. Show on site
6. (optional) Cache results
Of course, you can use pdoTools methods for this snippet.
Result:
Когда страница грузится из базы, то все окей, даже следующая страница прогружается. Если же из куша загрузка, то ничего не происходит. Просто выводится первая страница и все, без пагинации даже.
Ниже вызов и сниппет.
Пятница все-таки))Спасибо!