Inconsistency of root_datadir
Chris G <[email protected]>
| Newsgroups | gmane.comp.web.pyblosxom.user |
|---|---|
| Message-ID | <[email protected]> |
I have now discovered why I was having trouble with the value of
data["root_datadir"], it's inconsistent depending on whether the URL
you give to pyblosxom points at a file or not.
If you give pyblosxom a URL which points at a file which pyblosxom
knows how to process, e.g.
http://home.isbd.net/cgi-bin/pyblosxom.cgi/wiki/tools/solderStations
then data["root_datadir"] is tools/solderStations.rst (I use the
.rst renderer).
However if you give pyblosxom a URL which points at a directory,
e.g.:-
http://home.isbd.net/cgi-bin/pyblosxom.cgi/wiki/tools/
the data["root_datadir"] is /var/www/htdocs/pb/data.
This doesn't seem very consistent to say the least. I was trying to
use data["root_datadir"] in a plugin in cb_prepare to find the name
of the file/directory currently being accessed. It works as I want
for files but fails completely for directories.
Should I be using something different? All I want basically is the
last part of the URL given to pyblosxom, i.e.
"wiki/tools/solderStations.rst" or "wiki/tools/".
(This is all of course using the wgbwiki.py plugin if that's at all
relevant)
--
Chris Green
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/