Cotonti / Open Source PHP Content Management FrameworkContent Management Framework

Forums / Cotonti / Extensions / Support / Page Archive outputs everything?

No matter the setting, all website pages are available in the archive.

foxhound
#1 2012-09-29 00:27

I installed the Page Archive plugin, which is great btw but I am having one problem with it.
http://www.cotonti.com/extensions/navigation-structure/page_archive

I have set in the admin panel to ignore system pages, but it still outputs those.
Additionally, no matter which section I specifify in the {PHP|pagearchive('xxxx')}, it always outputs all sections.
I have 3 sections; news, files and documentation.
When in the files list I set {PHP|pagearchive('files')} it will list only the months in which files have been added to that list section. But if you click the month it outputs everything (all other section, news and documents and system)

Is this a bug with this plugin? I noticed it is already a few months old and maybe something changed?

I am using the latest version of Sienna.

<img src="http://www.armaholic.com/datas/thumbs/green-sea-battalion-uniforms-version-03-preview_4.jpg" alt="green-sea-battalion-uniforms-version-03-" />

This post was edited by foxhound (2012-09-29 00:37, 8 years ago)
Kort
#2 2012-09-29 07:20

Plugin config is used in the plugin for global settings. It is more convenient to use it via callbacks with a specific set of options in each one. Check pagearchive.global.php for the callback parameters:

{PHP|pagearchive('blog','yearly','pagearchive.yearly','1','12','desc','podcasts','')}
  1. Output pages from the blog category
  2. Use 'yearly' mode
  3. Use pagearchive.yearly.tpl template
  4. 'Current year only' is on
  5. Limit to 12 items
  6. Desc sorting order
  7. Blacklist 'podcasts' category
  8. No items in the whitelist
Seditio.by - создание сайтов, разработка плагинов и тем для Котонти
foxhound
#3 2012-09-29 09:23

Thanks for that, that was really usefull and has helped me halfway. This is the callback I made to my archive:

{PHP|pagearchive('files','monthly','pagearchive','1','12','desc','system','files_units;files_missions')}

Which seems to work fine in the main list (I tested this by adding only 1 file to one cat and it outputs only that specific month to be able to choose from), however when I click the "months" link it will again output all pages of all categories in that particular month, including system pages (system).
This is the url it gives me when I click on that month: http://www.mydomain.com/index.php?e=page&c=archives&year=2012&month=8

I have a stucture, really simple:
- news (with some subsections)
- files (with some subsections)
- documentation (with some subsections)
- system (no subsections)

<img src="http://www.armaholic.com/datas/thumbs/green-sea-battalion-uniforms-version-03-preview_4.jpg" alt="green-sea-battalion-uniforms-version-03-" />
Kort
#4 2012-09-29 11:15

You sould also have an empty Archives category (archive by default) to output the pages.

Seditio.by - создание сайтов, разработка плагинов и тем для Котонти
foxhound
#5 2012-09-29 14:19

Yes, sorry forgot to mention that. I have an empty "archives" category in my pages structure as the installation instructed. I Have added "archives" (without the "" ) in my plugin configuration field (Pseudo-category for archive).
 

 

[add on]
I also noticed it does not output the number of pages in the particular month behind the month. Which it should do since I added ({ROW_COUNT}) in my page pagearchive tpl.
 

<img src="http://www.armaholic.com/datas/thumbs/green-sea-battalion-uniforms-version-03-preview_4.jpg" alt="green-sea-battalion-uniforms-version-03-" />

This post was edited by foxhound (2012-09-29 15:01, 8 years ago)
Trustmaster
#6 2012-09-29 18:25

You're right, the page showing the results isn't aware of additional filters you apply in the widget. It only shows all pages for that period.

May the Source be with you!
foxhound
#7 2012-09-29 20:12

Ok, thank you for confirming that. smiley
But, is that how it is supposed to be or is that a bug? I ask cause if it is to be like that I need to change some text fields in my skin to not confuse the visitor.

<img src="http://www.armaholic.com/datas/thumbs/green-sea-battalion-uniforms-version-03-preview_4.jpg" alt="green-sea-battalion-uniforms-version-03-" />
Trustmaster
#8 2012-09-30 07:58

It is a missing feature rather than a bug. You can add a request here but I can't promise a quick fix.

May the Source be with you!
foxhound
#9 2012-09-30 12:36

No need to promise me a quick fix at all, but I do hope you will come around it at some point and make them work. I have added a request to Github wink

<img src="http://www.armaholic.com/datas/thumbs/green-sea-battalion-uniforms-version-03-preview_4.jpg" alt="green-sea-battalion-uniforms-version-03-" />