Apart from hacking the module, is there any way to change the displayed text for year + month to have the form "July 2008" rather than "July, 2008" (remove the comma)?

Also, is there any way to set it up to pass and handle its arguments as 2008/07, rather than as 200807?

I tried doing this using two separate arguments for year and date, but there is apparently no way to emulate the behavior of the prebuilt Archive view if I do that.

Comments

alcroito’s picture

You will probably need to create your own argument handler to get that working. Copying the default archive handler would be a start.

merlinofchaos’s picture

Status: Active » Closed (works as designed)

It is impossible to have 2008/07 as a separate argument. You'll have to use two different arguments, which should do pretty much what you need.

kopo88’s picture

How do I create a Views block that works like the default Archive block, but creates 2008/07 links instead of 200807 links? Every combination of two separate Year and Month arguments I've tried shows either one or the other, but not both.

So you end up with either
January (2) --> archive/01
March (3) --> archive/03
etc

or

2008 (6) --> archive/2008
2007 (4) --> archive/2007
etc

Is there any way to to combine the link text and link arguments?

glennr’s picture

Can anyone help with the first part of that question: is there any way to change the displayed text for year + month to have the form "July 2008" rather than "July, 2008" (remove the comma)?

Thanks.

nchase’s picture

The archive argument year + month isn't suitable to produce a real archive like wordpress does.

Using year + month argument the block looks something like this:
Januar 2010
where the link is 201001 - which is unsuitable for a deep links archive. Imagine the page view which is formated
with seperat year and month argument, where the links are 2010/01. If you change the block view to that the block will not format like "January 2010" it will look like "2010" as the month is the second argument.

this is a show stopper for real archive functionality.

nchase’s picture

The archive argument year + month isn't suitable to produce a real archive like wordpress does.

Using year + month argument the block looks something like this:
Januar 2010
where the link is 201001 - which is unsuitable for a deep links archive. Imagine the page view which is formated
with seperat year and month argument, where the links are 2010/01. If you change the block view to that the block will not format like "January 2010" it will look like "2010" as the month is the second argument.

this is a show stopper for real archive functionality.

merlinofchaos’s picture

this is a show stopper for real archive functionality.

Then I guess you get to write your own.

pauln600’s picture

It seems that this problem has been solved for the particular case of argument
Node : Année + mois de création

However, it still exists if other date fields are used - for example,
Date : Date (node) Contenu: Date limite (field_date_limite)

So, does anyone know what the original solution was and how it can be generalized -
I'm sifting through the code trying to find out where the format is set,
no joy so far...

pauln600’s picture

Well, the answer to this question seems to be that it's not easy to get at that comma - it's reduced from the 'long' date format in the date module (function views_formats
in date_api_sql.inc). For now, my not-so-pretty solution is to put the date module in ./sites/mysite/modules/ and hack that function to override the date format (i.e.,
explicitly set $formats['display'] = 'F Y';)... kind of ugly, but it will have to do for now.

Paul N.

xjm’s picture

Re: #9 - you can configure your date formats at admin/settings/date-time/formats. No need to hack core. Simply add a new date format (without the commas) and then set the long date format to use your new format. See #656806: Commas in date summary views for more information.