[xwiki-devs] [New Rendering] Link rendering when no alias
Hi, In the current rendering a link like [Space.MyPage] is displayed as "My Page" (camelcase rendering + removal of space prefix) when no alias is specified. We need to decide what to do with the new rendering. There are several options: * MyPage * Space.MyPage * My Page * wiki:Space.MyPage * (the page title) I propose to default to the page name without space nor wiki name (i.e. "MyPage" in our example). We could also make it configurable with variables like %w (wiki name), %s (space name), %p (page name), %P (camel cased page name, i.e. "My Page") and %t (page title). The default would be %p but users could change it to %s.%p or %w:%s.%p or whatever else they want. WDYT? Thanks -Vincent
On Sat, Aug 9, 2008 at 6:43 PM, Vincent Massol <[email protected]> wrote:
Hi,
In the current rendering a link like [Space.MyPage] is displayed as "My Page" (camelcase rendering + removal of space prefix) when no alias is specified.
We need to decide what to do with the new rendering. There are several options: * MyPage * Space.MyPage * My Page * wiki:Space.MyPage * (the page title)
I propose to default to the page name without space nor wiki name (i.e. "MyPage" in our example).
We could also make it configurable with variables like %w (wiki name), %s (space name), %p (page name), %P (camel cased page name, i.e. "My Page") and %t (page title). The default would be %p but users could change it to %s.%p or %w:%s.%p or whatever else they want.
WDYT?
+1 for "MyPage" and +1 for configurable.
Thanks -Vincent
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Thomas Mortagne
+1 for configuration and default=%p. Vincent Massol wrote:
Hi,
In the current rendering a link like [Space.MyPage] is displayed as "My Page" (camelcase rendering + removal of space prefix) when no alias is specified.
We need to decide what to do with the new rendering. There are several options: * MyPage * Space.MyPage * My Page * wiki:Space.MyPage * (the page title)
I propose to default to the page name without space nor wiki name (i.e. "MyPage" in our example).
We could also make it configurable with variables like %w (wiki name), %s (space name), %p (page name), %P (camel cased page name, i.e. "My Page") and %t (page title). The default would be %p but users could change it to %s.%p or %w:%s.%p or whatever else they want.
WDYT?
-- Artem Melentyev
Vincent Massol wrote:
Hi,
In the current rendering a link like [Space.MyPage] is displayed as "My Page" (camelcase rendering + removal of space prefix) when no alias is specified.
We need to decide what to do with the new rendering. There are several options: * MyPage * Space.MyPage * My Page * wiki:Space.MyPage * (the page title)
I propose to default to the page name without space nor wiki name (i.e. "MyPage" in our example).
+1
We could also make it configurable with variables like %w (wiki name), %s (space name), %p (page name), %P (camel cased page name, i.e. "My Page") and %t (page title). The default would be %p but users could change it to %s.%p or %w:%s.%p or whatever else they want.
WDYT?
Where exactly is this configured? Can you give an example? -- Sergiu Dumitriu http://purl.org/net/sergiu/
On Aug 12, 2008, at 1:26 AM, Sergiu Dumitriu wrote:
Vincent Massol wrote:
Hi,
In the current rendering a link like [Space.MyPage] is displayed as "My Page" (camelcase rendering + removal of space prefix) when no alias is specified.
We need to decide what to do with the new rendering. There are several options: * MyPage * Space.MyPage * My Page * wiki:Space.MyPage * (the page title)
I propose to default to the page name without space nor wiki name (i.e. "MyPage" in our example).
+1
We could also make it configurable with variables like %w (wiki name), %s (space name), %p (page name), %P (camel cased page name, i.e. "My Page") and %t (page title). The default would be %p but users could change it to %s.%p or %w:%s. %p or whatever else they want.
WDYT?
Where exactly is this configured? Can you give an example?
The idea is to have it configured in the xwiki configuration using the new configuration module that I've started working on. But it's not ready yet. Right now there's only a XHTMLLinkRenderer and it's where to label to display is computed but since we'll want to share that logic with other renderers we could have a LinkRenderer class or LinkSerializer class and the configuration would be associated with it. Thanks -Vincent
participants (4)
-
Artem Melentyev -
Sergiu Dumitriu -
Thomas Mortagne -
Vincent Massol