Re: Yeararchives question
will kahn-greene <[email protected]> Tue, 04 May 2010 13:31:12 -0400
| Newsgroups | gmane.comp.web.pyblosxom.devel |
|---|---|
| Message-ID | <[email protected]> |
That looks good to me. Feel free to push it.
On 05/04/2010 11:30 AM, Sebastian Spaeth wrote:
> On 2010-05-04, will kahn-greene wrote:
>> That's my fault, too. I only recently converted wbgarchives to
>> yeararchives. The former was a hack for my site. The latter should be
>> less hacky.
>>
>> I think in this case we want to specify the flavour. It shouldn't be
>> hardcoded to html, but it should be the flavour the user is currently
>> viewing the site with. You actually just fixed an issue with this very
>> thing in the tags plugin. The fix for this plugin should be similar to
>> that section of the tags plugin.
>
> Please pull or let me know if I should push this one.
>
> http://gitorious.org/~spaetz/pyblosxom/spaetz-pyblosxom/commit/4761129a626d2d09186049ca97ec63c489cad703
>
> --- a/plugins/archives/yeararchives.py
> +++ b/plugins/archives/yeararchives.py
> @@ -194,8 +194,14 @@
> items.sort()
> items.reverse()
>
> + # Use current (or default) flavour for permalinks
> + try:
> + flavour = data["flavour"]
> + except KeyError:
> + flavour = config.get("default_flavour", "html")
> +
> l = ("(%(path)s) <a href=\"" + baseurl +
> - "/%(file_path)s.html\">%(title)s</a><br>")
> + "/%(file_path)s." + flavour + "\">%(title)s</a><br>")
> e = "<tr>\n<td valign=\"top\" align=\"left\">%s</td>\n<td>%s</td></tr>\n"
> d = ""
> m = ""
>
>> Also, we should probably make the template configurable like we did with
>> the category and tags plugins.
>
> Possibly at some time, yes...
>
> Sebastian
------------------------------------------------------------------------------