Archives - various.

Discussion corner for Developers of Serendipity.
Post Reply
Don Chambers
Regular
Posts: 3652
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Archives - various.

Post by Don Chambers »

Some ramblings regarding archives.

When on an archive page for a specific month ($view==archives), I see that $head_subtitle gets set to this: @define('ENTRIES_FOR', 'Entries from %s'); while just below that, the h3 uses <h3 class='serendipity_date'>{$CONST.TOPICS_OF} blah blah </h3>

If they truly need to be 2 different constants (one includes the month/year string and one does not), I would at least suggest that the language file be updated so that both use either the word "topics" or "entries", but not both. This is obviously the english language file, I do not know about any others.

Next, what might not be overly clear to a lot of s9y users and their visitors is that the archive functionality is category specific if navigated to from a category view. Do we have access to any variable that lets us know that? Ideally, I would like to append/prepend something to that <h3> tag to include the category name when appropriate.... interestingly enough, $head_title does become the category name for the specific month archive ($view==archives), but it has not yet changed to that for the older archives page with the graph bar ($view==archive).

Anyway, I hope that is clear enough. I have a nasty cold/flu thing thanks to my kids so I might not be thinking clearly.
=Don=
Don Chambers
Regular
Posts: 3652
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Post by Don Chambers »

I'm bumping this because I moved it from its original post location in the general discussion forum. Any input?
=Don=
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Archives - various.

Post by garvinhicking »

Hi!

You can change the TOPICS_OF constant in the english language file to also read "entries", if you like. I don'T really care if its topics or entries, I understand both.

As for including the category there, this would mean changing all templates. You can draw the current category from $category_info and emit that in index.tpl? Or do you have another suggestion?

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Don Chambers
Regular
Posts: 3652
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Re: Archives - various.

Post by Don Chambers »

garvinhicking wrote:You can draw the current category from $category_info and emit that in index.tpl? Or do you have another suggestion?
OK, in entries_summary.tpl, I was able to use

Code: Select all

{if $category}{$category_info.category_name}{/if}
to append the category name to "topics from month, year" - which is exactly what I wanted to do when the summary is category specific.

This does not, however, work in entries_archives.tpl when that view is category-specific.

Can you work your magic on that view/page to support the same thing? :)

BTW - do I need to worry about the possibility that either of these pages can be viewed using multiple categories?
=Don=
Don Chambers
Regular
Posts: 3652
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Post by Don Chambers »

Nevermind - I had to clear my cache. It works on that page too.
=Don=
Post Reply