New in CVS: easier linking to postings
Georg Bauer <gb-BRhJDZTO+/[email protected]> Thu, 26 Feb 2004 13:46:46 +0100
| Newsgroups | gmane.comp.pythin.pyds.devel |
|---|---|
| Message-ID | <r02010100-1028-D6F8FC14685911D8B228000A9573A72A@[10.0.0.145]> |
Hi! I just commited a change that makes linking to other postings in reST very simple. You can just refer to postings via their ID. This could be done with the stray link resolver already, but the tools needed to be hooked up with the stray link resolver for this to work - the reason being that the stray link resolving mechanism tries to mimik a wiki like page creation theme where you first link pages and then create them from this link. The new feature works differently, as you just can use reST substituions. To refer to a posting P115, you just put |P115| into your source. This will be replaced with a link that gives the posting title as the link text and the posting GUID as the URL (the stray link resolver allways uses the text you write for the link text). If you want to refer to a posting in one special tool, just write |pictures.1| to link to the picture with ID 1, for example. This posting fetching happens between the case-sensitive shortcut lookup and the case insensitive shortcut lookup. So actually what happens with substitutions is as follows: 1. check wether an exact match exists in the shortcuts. If yes, evaluate the shortcut and insert the result 2a. when an explicit tool is given (tool.id), check wether the given tool has an exact match for the given id. If yes, return a HTML snippet with the link to that items GUID with that items title as the link text. 2b. when no explicit tool is given, check wether any tool that implements getRSSItem (order the tools to check by level) has an exact match for the given id. If yes, return a link in the same way as with 2a 3. when neither exact shortcuts nor posts with exact ID match exist, try to find a shortcut that is identical when case is ignored. 4. if no rule triggers, just return the shortcut as it is written in the source. bye, Georg