Since a while now, it’s possible to choose between the document
(wiki:Space1.Space2.Document) or the page
(wiki:Space1/Space2) reference syntax when linking a page.
While it’s possible to link an attachment using the document reference syntax it’s not possible to do the same with the page reference syntax. The syntax does exist already, but there is no entry point to use it in the link syntax.
So we need to decide of a prefix to use for page attachments, like we have the prefix attach
for document attachments.
And as usual naming is the hard part and I honestly don’t have a perfect proposal so here are some ideas:
-
page_attachment (consistent with EntityType.PAGE_ATTACHEMENT)
-
page_attach (kind of a mix of being consistent with both
attach
which leads to EntityType.ATTACHMENT and EntityType.PAGE_ATTACHMENT)
-
pageAttachment (same logic as
1
but camel case version)
-
pageAttach (same logic as
2
but camel case version)
-
pattach (short and closer to
attach
but a bit weird)
Other brilliant ideas ?
Since the syntax is likely to be seen as such more often in a wiki syntax context than as a Java one (in Java, only references to EntityType.PAGE_ATTACHEMENT are likely to be used, not the string declaration itself), I have a slight preference for pageAttach
since we use more camel case than snake case in wiki syntax eg for wiki macro names, parameters or options. HTH.
So for me the most logical is (we don’t use any _
in link prefixes and the other parts of the syntax use camel case for query string and others):
- Doc linking using a
document
reference style: [[doc:wiki:Space1.Space2.Page]]
(or [[wiki:Space1.Space2.Page]]
).
- Attachment linking using a
document
reference style: [[attach:wiki:Space1.Space2.Page]]
.
- Doc linking using a
page
reference style: [[page:wiki:Space1/Space2/Page]]
.
- Attachment linking using a
page
reference style: [[pageAttach:wiki:Space1.Space2.Page]]
.
Note: It’s starting to be a bit complex for wiki users with all the various notations…
@tmortagne I couldn’t find a reference to the page
link prefix in the syntax documentation, did you forget to add it?
The content of that page was using {{display reference="platform:XWiki.XWikiSyntax"/}}
. The platform wiki is now gone, so I’ve pointed to the main wiki now. Looks good. Thanks
BTW note that this will be a backward-compatibility breakage for XWiki Syntax 2.1 if we introduce it for it…
Any existing link to a subwiki named pageAttach
(or any of the other proposed names) and not using the explicit doc
link prefix will be broken.
It seems that pageAttach
is a clear winner, so let’s go with that. Works started on Loading....