Is there any possibility to decide inside the python code of the page
template which document is beeing generated?
What I want is the following:
I want to generate a calendar in the top corner of my blogpage. The
calendar on the index page should be the calendar for the actual month
(or better: the month at which the index page was generated).
The calendar in each of the archive pages should refer the month of the
archive page. Here I assume that I'm generating monthly archives.
I've found the shared.archives object, which contains all entries of all
archives. That's fine enough for extracting the entries' metadata. But
can I get the information which archive page or which category page is
beeing generated?
bye,
Adalbert
--
A man's house is his castle. -- Sir Edward Coke
All the best,
Fuzzyman
http://www.voidspace.org.uk/python/index.shtml
> bye,
> Adalbert
>
--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.405 / Virus Database: 268.12.4/449 - Release Date: 15/09/2006
I think the variable 'pagename' should be defined. I haven't tested
this, but it can probably be used like this:
<#
if pagename == 'index.html':
...do this...
else:
...do that...
#>
If your front page has a different name, use options['frontpage_name'].
HTH,
--
Hans Nowak
http://zephyrfalcon.org/
> I think the variable 'pagename' should be defined. I haven't tested
> this, but it can probably be used like this:
This might just work. :) And now a last question: is there an object,
which contains only the entries, which will be published on the $pagename?
As far as I understand the philosophy of the shared-object it contains all
entries, not only those which will be included in the HTML document.
Bye,
Adalbert
--
Duckies are fun!
No, but there might be other ways to get this information. In
weblog.py, for example, the create_front_page() method stores this info
in self._fp_entries. For archive pages, there's the 'archives'
variable, etc. However, it would probably require some Firedrop hacking
to make these data available to the user, in a consistent manner.