#3294: [PATCH] Trac fails to set HDF var `wiki.page_name` when viewing
`WikiStart`
page
---------------------------+------------------------------------------------
Reporter: [EMAIL PROTECTED] | Owner: cboos
Type: defect | Status: assigned
Priority: normal | Milestone:
Component: wiki | Version: devel
Severity: normal | Resolution:
Keywords: |
---------------------------+------------------------------------------------
Changes (by cboos):
* milestone: 0.10 =>
* owner: jonas => cboos
* status: new => assigned
Comment:
The problem with using the HDF's `wiki.page_name` for retrieving
the page name is that you'll get either "WikiStart" or "Wiki Start",
depending on the value of the `[wiki] split_page_names` option.
A more reliable way to get that information in milestone:0.10 would
be to parse the value of the HDF's `wiki.current_href` key:
{{{
#!python
current_href = req.hdf.get('wiki.current_href')
current_page = current_href[current_href.find('/wiki/')+6:]
}}}
--
Ticket URL: <http://projects.edgewall.com/trac/ticket/3294>
The Trac Project <http://trac.edgewall.com/>
_______________________________________________
Trac-Tickets mailing list
[email protected]
http://lists.edgewall.com/mailman/listinfo/trac-tickets