[xwiki-users] How to get permanent link of a page
There is share by email link for the page that displays the link which contains the page name and it is too long. Is there a way for retrieving a permanent link for a page which does not change after hierarchy and name changes, ang also it is short? Thanks Kurtulus -- View this message in context: http://xwiki.475771.n2.nabble.com/How-to-get-permanent-link-of-a-page-tp7589... Sent from the XWiki- Users mailing list archive at Nabble.com.
On Mon, Feb 24, 2014 at 1:55 PM, 114 <[email protected]> wrote:
There is share by email link for the page that displays the link which contains the page name and it is too long.
Is there a way for retrieving a permanent link for a page which does not change after hierarchy and name changes, ang also it is short?
No, but when you rename/move a page you could 'keep' the old 'location' and put there a redirect to the new location: {{velocity}} $response.sendRedirect($xwiki.getURL('newWiki:NewSpace.NewPage')) {{/velocity}} This is not done automatically. Hope this helps, Marius
Thanks Kurtulus
-- View this message in context: http://xwiki.475771.n2.nabble.com/How-to-get-permanent-link-of-a-page-tp7589... Sent from the XWiki- Users mailing list archive at Nabble.com. _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
Is there a way for retrieving a unique ID for a page and also there should be a URL for displaying the page with this unique ID. Then I can write an application for generating a permalink. -- View this message in context: http://xwiki.475771.n2.nabble.com/How-to-get-permanent-link-of-a-page-tp7589... Sent from the XWiki- Users mailing list archive at Nabble.com.
Hi, Each page is internally stored in the database with an id. However that id is a computed id. It’s computed from: - the doc’s wiki - the doc’s space - the doc’s page - the doc’s language So if you rename a document for example, the computed id will be different. The goal with this was to have friendly URLs, i.e be able to load a doc from the database given it’s name. What we’d like to do in the future is to support redirecting to renamed documents automatically, see: http://jira.xwiki.org/browse/XWIKI-3622 Thanks -Vincent On 24 Feb 2014 at 19:06:13, 114 ([email protected]) wrote: Is there a way for retrieving a unique ID for a page and also there should be a URL for displaying the page with this unique ID. Then I can write an application for generating a permalink.
It's a good idea to include such information in an ID but lack of sequential primary key for each page on the database is a design weakness I think. Will it be included on version 6.0? I hope so. Thanks -- View this message in context: http://xwiki.475771.n2.nabble.com/How-to-get-permanent-link-of-a-page-tp7589... Sent from the XWiki- Users mailing list archive at Nabble.com.
On 25 Feb 2014 at 18:58:00, 114 ([email protected](mailto:[email protected])) wrote:
It's a good idea to include such information in an ID but lack of sequential primary key for each page on the database is a design weakness I think.
I agree that offering a permalink for pages is important but this may not need a sequential id in DB.
Will it be included on version 6.0? I hope so.
In 6.0 I highly doubt it since I don’t know anyone working on this. Unless you provide a nice Pull Request for this! :) For 6.x, maybe we’ll be able to implement the “follow rename” feature. However, changing the DB structure has not been discussed and is not planned so far. Thanks -Vincent [snip]
2014-02-26 12:13 GMT+01:00 [email protected] <[email protected]>:
On 25 Feb 2014 at 18:58:00, 114 ([email protected](mailto: [email protected])) wrote:
It's a good idea to include such information in an ID but lack of sequential primary key for each page on the database is a design weakness I think.
I agree that offering a permalink for pages is important but this may not need a sequential id in DB.
As pages have versions, you could use any invariant from very first version of page to build a unique ID I suppose (like, hash of content). Question also is, would you want to have just permalink of a page (ie, last version), and/or permalinks on a specific version of a page.
Will it be included on version 6.0? I hope so.
In 6.0 I highly doubt it since I don't know anyone working on this. Unless you provide a nice Pull Request for this! :)
For 6.x, maybe we'll be able to implement the "follow rename" feature. However, changing the DB structure has not been discussed and is not planned so far.
Thanks -Vincent
[snip]
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
Hi Kurtulus, Such a feature could be easily implemented if you really want it. One way of doing it would be to just use an object where you store an Unique ID, then add an button to the UI (docextra section for instance), named something like "Get Permalink", that generates the Unique ID and stores it in the current page. The permalink service (a wiki page) will accept Unique IDs, retrieve the document that corresponds to that unique id and redirect the request to it. No matter if the document is renamed or moved to another space, as long as the object remains in the page, the permalink will work. So, you`d access something like http://my.domain/xwiki/bin/view/XWiki/Permalink?uid=123ABC234DEF and you`ll be redirected to http://my.domain/xwiki/bin/view/SomeSpace/SomePageThatYouWantedToShareWithYo... . Pretty easy to do. We`d love to have such a contribution among the existing extensions from you or anyone else interested. Cheers, Eduard On Wed, Feb 26, 2014 at 3:23 PM, Jeremie BOUSQUET < [email protected]> wrote:
2014-02-26 12:13 GMT+01:00 [email protected] <[email protected]>:
On 25 Feb 2014 at 18:58:00, 114 ([email protected](mailto: [email protected])) wrote:
It's a good idea to include such information in an ID but lack of sequential primary key for each page on the database is a design weakness I think.
I agree that offering a permalink for pages is important but this may not need a sequential id in DB.
As pages have versions, you could use any invariant from very first version of page to build a unique ID I suppose (like, hash of content). Question also is, would you want to have just permalink of a page (ie, last version), and/or permalinks on a specific version of a page.
Will it be included on version 6.0? I hope so.
In 6.0 I highly doubt it since I don't know anyone working on this.
Unless
you provide a nice Pull Request for this! :)
For 6.x, maybe we'll be able to implement the "follow rename" feature. However, changing the DB structure has not been discussed and is not planned so far.
Thanks -Vincent
[snip]
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
participants (5)
-
114 -
Eduard Moraru -
Jeremie BOUSQUET -
Marius Dumitru Florea -
vincent@massol.net