[xwiki-users] Camel Case
What bit of code is inserting spaces into my CamelCase links by default? Is there any easy way to deactivate this? Thanks, Paul D. Grodt TECORE Wireless Systems
What bit of code is inserting spaces into my CamelCase links by default? Is there any easy way to deactivate this?
Where is this happening? What are you doing exactly?
Thanks -Vincent
I create a page called "Main/SamplePage". In AnotherPage, I use the wiki markup "[SamplePage]". The display of AnotherPage prints a link that looks like "Sample Page". I wish it to literally display as "SamplePage". -Paul Grodt
On Nov 20, 2007, at 9:48 PM, Paul Grodt wrote:
What bit of code is inserting spaces into my CamelCase links by default? Is there any easy way to deactivate this?
Where is this happening? What are you doing exactly?
Thanks -Vincent
I create a page called "Main/SamplePage".
In AnotherPage, I use the wiki markup "[SamplePage]".
The display of AnotherPage prints a link that looks like "Sample Page". I wish it to literally display as "SamplePage".
You're right, I had never noticed this or didn't recall it... I've checked the code and found where we do this conversion (it's in XWikiLinkFilter.java, line 206 and 213 FWIW). The easy solution is to write: [SamplePage>SamplePage]. Now if you really to change the behavior, you'd need to do the following: 1) Create a class that extends XWikiLinkFilter.java and overrides the protected String getWikiView(String name) method. You can make it return name directly. 2) modify the META-INF/services/com/xpn/xwiki/render/filter/ XWikiFilter file and replace XWikiFilter by the name of your class 3) compile your class (you'll need the xwiki core JAR in WEB-INF/lib/ xwiki-core-*.jar) and copy it in WEB-INF/classes (or get xwiki sources from SVN and rebuild the core with your class). Hope it helps, -Vincent
You're right, I had never noticed this or didn't recall it...
I've checked the code and found where we do this conversion (it's in XWikiLinkFilter.java, line 206 and 213 FWIW).
The easy solution is to write: [SamplePage>SamplePage].
Now if you really to change the behavior, you'd need to do the following:
1) Create a class that extends XWikiLinkFilter.java and overrides the protected String getWikiView(String name) method. You can make it return name directly. 2) modify the META-INF/services/com/xpn/xwiki/render/filter/ XWikiFilter file and replace XWikiFilter by the name of your class 3) compile your class (you'll need the xwiki core JAR in WEB-INF/lib/ xwiki-core-*.jar) and copy it in WEB-INF/classes (or get xwiki sources from SVN and rebuild the core with your class).
Hope it helps, -Vincent
Wow, excellent answer; and quick too! Thanks! Paul G.
participants (2)
-
Paul Grodt -
Vincent Massol