Re: Yeararchives question
"Sebastian Spaeth" <[email protected]> Tue, 04 May 2010 17:30:55 +0200
| Newsgroups | gmane.comp.web.pyblosxom.devel |
|---|---|
| Message-ID | <[email protected]> |
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
------------------------------------------------------------------------------
_______________________________________________
Pyblosxom-devel mailing list
Pyblosxom-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/pyblosxom-devel
signature.asc
(application/pgp-signature, 197 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iEYEARECAAYFAkvgPa8ACgkQVYX1jMgnoGIW3gCfYq2Zujs0PU903zXoSs2SQHJF HHUAnjxMjTKG4dLAxZOAvMrTxsQfh5xh =nt8h -----END PGP SIGNATURE-----