Problog Date Archive

Permalink Browser Info Environment
Is it possible when visiting a month in the date archive (see attached image)(marked green) to only display results that are posts and not the month archive and year archive subpages (marked red)?

Thanks for your time!

1 Attachment

Type: Discussion
Status: New
albertalbert
View Replies: View Best Answer
RadiantWeb replied on at Permalink Reply
RadiantWeb
that's a really good suggestion.

looking into this.

ChadStrat
albertalbert replied on at Permalink Reply
albertalbert
great. let me know if you are successful.

also i just realized, that the results are not rendered in the same page-type as the rest of the blog and blogsearch. could not find out what page-type is used yet.

albert
albertalbert replied on at Permalink Reply
albertalbert
hi chad,

any hints on how to turn off the month archive and year archive subpages in the date archive yet? would really appreciate it!
RadiantWeb replied on at Permalink Best Answer Reply
RadiantWeb
You can go to those pages in the sitemap and add the "exclude from search index" property and exclude them from search results.

The reason they are not automatically set this way, is that they are "intended" to actually be pages with each month/year containing their own blog list of results for that month. In case a user would like to go back and review any entire months worth.

ChadStrat
albertalbert replied on at Permalink Reply
albertalbert
thank you very much, that already helped a lot!
superminimal replied on at Permalink Reply
superminimal
I had this same problem but it's a mega hassle to keep adding the 'exclude from search index' attribute to every month and year so I hacked it to automatically assign that attribute when the year and month pages are created.

In packages/problog/helpers/blogify.php around line 50, after this:
$canonical_year = $parent->add($pageType, array('cName' => $year, 'cHandle' => $year,'cDescription'=>$year.t(' Blog Posts')));


add this:
$canonical_year->setAttribute('exclude_search_index', 1);


And do the same for the month page, around line 130, after this line:
$canonical_month = $canonical_year->add($pageType, array('cName' => $month, 'cHandle' => $month,'cDescription'=>$month_name.', '.$year.t(' Blog Posts')));


Add this:
$canonical_month->setAttribute('exclude_search_index', 1);


Maybe there's a simple way to make children pages inherit attributes through the GUI but this works too.. hope this helps someone! = D
RadiantWeb replied on at Permalink Reply
RadiantWeb
This was updated/changed in v12 of ProBlog. All newly created date pages for canonical urls have exclude from pagelist and exclude from sitemap added automatically.

ChadStrat

concrete5 Environment Information

Browser User-Agent String

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You have not specified a license for this support ticket. You must have a valid license assigned to a support ticket to request a refund.