On 26 November 2015 at 19:38, vincent(a)massol.net <vincent(a)massol.net> wrote:
These 2 pages are not relative to each other.
Ok, now Im confused. Ive been doing web development for more years than I
care to count, and relative, to me, means 'they are next to each other'.
See
http://www.scriptingmaster.com/html/relative-link.asp
These two pages sit next to each other in the same tree.
In MyExamplePage, you’d need to write:
{{include reference=“test.WebHome”/}}
What is WebHome? And why do I need this when I am referencing relative
document?
Note that it seems we have a bug (not related to your example above, just
mentioning it for completeness); I’ve just created
http://jira.xwiki.org/browse/XWIKI-12861 for it.
Now to understand what this “WebHome” does here is a bit complex. Starting
with XWiki 7.2 we’re moving from a Page/Space paradigm to a Nested Pages
one and this is currently causing some friction to understand it for
newcomers. I’m not sure how we’re going to handle this (except that at some
point we’ll need to rewrite our model to remove the concept of spaces
probably).
Does that help:
http://platform.xwiki.org/xwiki/bin/view/Features/ContentOrganization#HHist…
?
Yes it does - thanks. But, I think you have given it the wrong name. If I
am not wrong, this is just a tree structure. Not nested.
@devs:
I think we need some better explanation. Maybe you can help tune the doc.
I think we need a documentation page on
xwiki.org to explain what is a
Page Reference. On
http://rendering.xwiki.org/xwiki/bin/view/Main/XWikiSyntax#HLinks we
explain it as: "A wiki page reference in the form [[wikiName:] space.]
(page). Examples: WebHome, Main.WebHome, mywiki:Main.WebHome”. However I
think we should instead link to that page about Page Reference, and explain
why you have to use something a bit different from what you see in the UI.
I think adding more documentation will help. But - IMO - there is a
fundamental design flaw. You have built XWiki to use a tree structure of
documents. And documents MUST be referenced using the tree structure.
Compare this to Mediawiki where all you need to know is the doucment name,
eg,
https://en.wikipedia.org/wiki/Korea_Medal_(South_Africa). This simple
concept is enough for millions of wikipedia documents. Wikipedia documents
can be any number of categories - and this does not affect how they are
referenced.
Again, IMO, the tree structure is something that early CMSs introduced, as
it basically replicates the file system in an OS. Wikis improved on this
by realizing that:
- documents often need to be in multiple categories
- users tend to want to find a specific document by name only
When the unique id of a document is the document name you then have:
- more friendly urls - wiki/my_document
- more flexibility on how documents are organized - a document could be
in more than one 'folder' at a time.
- easier to link to documents
--
Anton Hughes