create new tag
, view all tags

Feature Proposal: Use a slash to separate web from topic


Nowadays, thanks to the web and even office applications, almost everyone using a computer is familiar with the slash as a separator between "directories" and "files". TWiki is using a dot instead in its user interface, which makes topic names like "Web2.0" or "ProductRelease4.0" impossible.

Description and Documentation

Througout TWiki, the usage of the dot as separator between webs and topics should be discouraged / deprecated / eliminated.

At least I'm dreaming of a self-controlled setting of a "dot-free TWiki", or perhaps a "dot-free Web" which would then make it possible to have dots in topic names. In those dot-free TWikis the nasty ambiguities with hierarchical webs would vanish into thin air.

I know that this is a major incompatibility, and that it will be virtually impossible to enforce that change current content. Yet I'd like to have the chance to use the slash for new content, and benefit from it when naming topics.


  • Today a simple link like [[Web2.0]] would ask for a topic named 0 in the web named Web2. The error message says that the web doesn't exist, though the user never intended to leave his web. I had real trouble when explaining this to users who wanted to create documentation topics for sources. To be honest, I never found TWikiDotPm a good way to write TWiki.pm.
  • In TWiki's innards TWiki::normalizeWebTopicName, A/B and A.B are equivalent. This creates a problem for the parser when trying to figure out whether a subweb A/B was what the user wanted.

Impact and Available Solutions

WhatDoesItAffect: User interface, rendering
AffectedExtensions: Hierarchical webs
HaveQuickFixFor: No, there's no quick fix, and there shouldn't be.


This might start as a configurable $TWiki::regex{topicNameRegex}, but spreads through the whole code.

-- Contributors: HaraldJoerg


-- HaraldJoerg - 24 Mar 2007

As you say - it is a major incompatibility.

But I would claim that 99% of the problem would be eliminated of TWiki only interpreted the wikiwords and [[bracket]] syntax links with dots as web.topic when the web actually exists.

-- KennethLavrsen - 25 Mar 2007

Yes, major incompatibility. In addition, if we replace the dot with a slash, This/AndThat would suddenly produce unwanted links.

See also NOAUTOLINKForUnderscoreWikiWords, TopicDisplayName, UnderscoreWikiWords (old discussion).

-- PeterThoeny - 31 Mar 2007

Seems like a good idea though. Would it not be more natural for users? Is it not more elegant to have topics and URLs with actual dot character rather than spelled Dot?

Then again is that really worth the trouble? Supporting both dot and slash seems like a maintenance overhead. Right now '/' works fine if using [[...]] but won't auto link otherwise. KennethLavrsen idea's seems sensible, but would it not have a performance impact, especially when considering subwebs and pages with a lot of links?

-- StephaneLenclud - 01 Apr 2007

As Stephane writes - I think it would be more natural for users. The slash would still be forbidden in topic names, like it is in files, but the dot would be permitted, like it is in files. The slash would define hierarchies, like it is with file systems. Why forbid two characters in topic names if the engine can live with one?

And because I know it is an incompatibility I would only introduce it as a configuration / per-site / per-web option. There are new TWikis every day, and they could profit from a simpler syntax without being at risk with regard to unwanted links in thousands of old topics.

If performance would not be a pain point today, I'd go for more of today's acronym style autolinking: In all cases of doubt, autolink only if a reasonable link target exists. Plain CamelCase words would be the only style which could then be used to create topics "top-down" by just writing the word and then, after saving, create the CamelCase topic by clicking on the autogenerated link. All that autolinking isn't so cool, only that it happens to be one of the few holy cows which is common among almost all wiki engines....

That said, I see that the effects of the proposed change to WikiWord spec has surprised even Kenneth, its main driver. Another motivation to make incompatible changes, if at all, only as configurable options....

-- HaraldJoerg - 02 Apr 2007

Sure would be nice....

-- ThomasWeigert - 03 Apr 2007

one thing to note - and I've done it a few times, is that you can over-ride $TWiki::regex{topicNameRegex} from a Plugin. This means that you have a managed modification.. (whereas adding it to configure is probly just asking for support trouble.

That way, IF you do it right, your plugin would also have all sorts of unit tests to show what happenes when you change how TWiki does linking.

-- SvenDowideit - 03 Apr 2007

TreePlugin would have problems with "." in topic names. It's probably not the only one. I think would be a very disruptive change for the platform (read a lot of work). Unfortunately I think a lot of plug-ins don't have unit test and even less people to run them.

-- StephaneLenclud - 06 Apr 2007

Good point. This would make another step necessary: Not only installations, but also plugins need to state whether they are "dot-compliant". That' practically impossible, given the number of plugins. While it would theoretically be possible to clean up topics to no longer use the dot as a separator between web and topic, there is no chance to automatically check whether a plugin would misinterpret a dot as a separator between web and topic. And I can't even blame plugin authors if they rely on what's being so obviously implemented. Unfortunately the table below has no CurrentState "Withdrawn". The closest I could find was NeedsARethink, though I don't think I'll really rethink it....

-- HaraldJoerg - 06 Apr 2007

That's good idea though from the usability point of view. So maybe we need a state like PostponedForTechnicalReason or TechnicallyChallenging or MajorIncompatibility as PeterThoeny put it.

-- StephaneLenclud - 07 Apr 2007

Edit | Attach | Watch | Print version | History: r10 < r9 < r8 < r7 < r6 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r10 - 2007-04-07 - StephaneLenclud
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.