Edgewall Software
Home
Trac
Trac Hacks
Genshi
Babel
Bitten
Home
Download
Documentation
Mailing Lists
License
FAQ
Search:
Login
Preferences
Help/Guide
About Trac
Wiki
Timeline
Roadmap
Browse Source
View Tickets
New Ticket
Search
Context Navigation
+0
Start Page
Index
History
Editing FlexibleWikiPageNames
Adjust edit area height:
8
12
16
20
24
28
32
36
40
Edit side-by-side
= Flexible WikiPageNames = This page describes an experimental feature for having new custom-defined wiki page names conventions. The implementation can be found in the [source:branches/cboos-dev/flexible-branch flexible] branch. Each alternate Wiki Syntax is presented by a `IWikiPageNamesSyntaxProvider`. By default, there are 3 WikiPageNames syntaxes to choose from. This can easily be setup in the `[components]` section from the TracIni. Furthermore, it makes it easy to take full control of the wiki page names syntax by writing an additional plugin. For example, this is what we use: {{{ #!python class BctWikiPageNames(Component): """Like FlexibleWikiPageNames, but: * allow initial lower case letter * allow anything after the slash "/" """ implements(IWikiPageNameSyntaxProvider) # IWikiPageNameSyntaxProvider methods def get_wiki_page_names_syntax(self): return (WIKI_START + r"(?:[A-Z\d]{2,}[a-z]+" # 1st way r"|[a-z]?[A-Z\d]+[a-z]+(?:/?[A-Z\d]+[a-z]*)+)" + # 2nd way WIKI_TARGET + WIKI_END) }}} The `WIKI_START`, `WIKI_TARGET` and `WIKI_END` constants correspond to pieces of regular expressions that can be reused from syntax provider to syntax provider.
Note:
See
WikiFormatting
and
TracWiki
for help on editing wiki content.
Change information
Your email or username:
E-mail address and name can be saved in the
Preferences
Comment about this change (optional):
Note:
See
TracWiki
for help on using the wiki.