Re: Put a entry in first position
will guaraldi <[email protected]>
| Newsgroups | gmane.comp.web.pyblosxom.user |
|---|---|
| Message-ID | <[email protected]> |
I wrote pyinclude and use it in my blog to display my .project at the top.
Basically, there's a line in my head.html file like this:
<pre>
$util::include("/home/willg/.project")
</pre>
When the head.html template gets rendered, the file gets sourced in.
It's just like a php/ssi file include. Seconds ago (after reading your
email) I added handling for relative filenames as well. If you do a
relative filename, then it'll base that filename off of the root_datadir.
So if my head.html template had:
<pre>
$util::include("desc.dsc")
</pre>
And you were looking at http://bluesock.org/~willg/blog/dev/pyblosxom/
then it would pick up the desc.dsc file in the dev/pyblosxom directory.
If you were looking at http://bluesock.org/~willg/blog/ it would pick up
the desc.dsc file in the root of my datadir directory. If the file
doesn't exist, then it silently "fails" and fills in an empty string.
So if you pick up the new pyinclude (version 1.2) off my site, then you'll
have this additional functionality and I think that'd solve your problem.
Also, PyBlosxom 1.0 (not yet released, but you could pick up an alpha if
you wanted) allows for categories to have templates which override the
templates in your datadir. So if you had files in your filesystem like
this:
datadir/
- head.html
- foot.html
- story.html
- content-type.html
- dev/
- head.html
- project1/
- head.html
- project2/
- head.html
The dev/project2/head.html would get shown if the user were looking at
anything in dev/project2.
Each of these head.html files could have their own description text. You
could solve your problem that way.
The third way you could solve your problem is to write a plugin that has a
cb_prepare function which injects an entry into the head of the
entry_list. I actually wrote a plugin like this, but deleted it because I
think it's bad form since it won't play well with feeds (RSS, ATOM, ...).
I don't have the code anymore.
Hope that helps.
/will
On Fri, 14 May 2004, Pablo Barrera González wrote:
>
> I've got another problem. I would like to put a entry in the top of the
> list, without looking its date. It will be some kind of introduction to
> the current category like
>
> "welcome to my weblog"
>
> "category software: This are the programs I do"
>
> I think you get it.
>
> Is there any way of doing this or should I make a plugin for change the
> default behavior of pyblosxom? I saw a plugin called pyinclude, but I
> don't know if it will fit. Any idea?
>
> Thank you
>
> Pablo
>
>
--
whatever it is, you can find it at http://www.bluesock.org/~willg/
except Will--you can only see him in real life.
-------------------------------------------------------
This SF.Net email is sponsored by: SourceForge.net Broadband
Sign-up now for SourceForge Broadband and get the fastest
6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id%62&alloc_ida84&op=click