Hi all,

Is there a particular reason why the monthly archives in views give the arguments as monthyear instead of month/year?

I've made the trivial changes on an install of drupal, to enable monthly archives in the same way wp, mt and blogger offer, (by escaping a couple of slashes), and it seems two work fine now, but I'm wary to submitting the changes as a patch, because I'm wary that they would break current drupal's code conventions.

Is there way to get YYYY/MM style urls instead of YYYYMM urls in a way that doesn't cause problems with how drupal constructs paths (I'm assuming the approach I've given hear will play merry hell with how $args style queries are constructed, but I don't know of another way to list monthly archive summary links in blocks.

Changes are made in this file from the standard viewsnode.inc file on lines 602, 609 and 612 - I've just added escaped forward slashes, changing %Y%m to %Y\/%m.

This is the first time post to any of the dev forums, and I'm still new to php, so please go easy on me.

CommentFileSizeAuthor
views_node.inc30.24 KBchris_d_adams

Comments

jin410’s picture

I was wondering the same thing.
Archive shows up as "sitename.com/archive/yearmonth" instead of ""sitename.com/archive/year/month"

Anyone try this or know of any other way of doing this without modifying the module?

jamesoakley’s picture

For what it's worth, I've created a patch at http://drupal.org/node/293791 that adds the option of yyyy/mm as a format. I'm much happier doing that than changing how the built in "created year + month" field works, as that would be a breaking change for anyone else already using that field.

luco’s picture

thank you very much JamesOakley, that's exactly what I was bloody looking for! :]

I'm getting a certain "the pieces fall into place" kind of high. it won't last much, though. bwuahahahaha.

EDIT: it really didn't last long - I'm using Drupal 5. but chris_d_adams is a nice option as well. I'll try it.

luco’s picture

on a more serious note, I'd like to state that I support these fellas' nice request as a much needed feature (even in having Drupal follow an already solid convention). if numbers count, then so be it.

pomliane’s picture

Status: Active » Closed (won't fix)

This version of Views Bonus Pack is not supported anymore. The issue is closed for this reason.
Please upgrade to a supported version and feel free to reopen the issue on the new version if applicable.

This issue has been automagically closed by a script.