Page Relations Application

Version 14.30 by Admin on 2019/11/25 00:18

cogCreate and display relations between pages as XWiki objects
TypeXAR
CategoryApplication
Developed by

Anca Luca, Clément Aubin, Stéphane Laurière

Active Installs19
Rating
2 Votes
LicenseGNU Lesser General Public License 2.1
Compatibility

XWiki 10.4+

Installable with the Extension Manager

Description

XWiki makes it possible to interlink pages in multiple ways: using embedded links, using a hierarchy via the nested pages feature, using tags or using structured objects. In some cases, it can be handy to have an additional way to link pages: as metadata added to the pages, using dedicated objects. It is typically useful when you want to navigate your wiki transversally rather than hierarchically, or when tags do not carry enough semantics, in particular due to the fact that tags cannot be tagged. The Page Relations application was created to ease the creation of relations between pages and the navigation of the wiki page graph.

Features

Adding, removing, displaying relations

The application provides a user interface for adding or removing relations to a page and for displaying the current page's relations, as illustrated in the image below, in a way that is similar to the way tags can be listed/added/removed.

ui-relations.png

PageRelations Panel

The application provides a panel displaying the current page's direct and inverse relations, named PageRelations.Code.PageRelationsPanel.

PageRelations macro

The application provides a macro {{pageRelations/}} displaying the current page direct and inverse relations. The macro has two parameters:

  • showTitles: true for displaying the "Relations" and "Facets" labels in the interface, defaults to true.
  • showFacets: true for displaying second-level relations that are highly connected to first-level relations, a.k.a "facets", see paragraph below, defaults to false.

Facets

NB: a more self-explanatory term than "facet" is being looked for.

The facets of a given page are its second-level relations that are highly connected to at least one its first-level relations. In the illustration below, the following facets show up for the page "Movies": "Charlie Chaplin", "Comedy", "Drama". This means that among the pages that relate to the page "Movies", many of them (at least 4 by default) have a relation either to "Charlie Chaplin", "Comedy" or "Drama". The number of such relations is indicated between parentheses. Hitting that number acts a filter on the list of displayed relations: if you hit "Comedy", you will see all pages that have a relation to both pages "Movies" and "Comedy".

facets.png

Future

  • Automated creation of relations when page links are detected in the content.
  • Ability to name relations, e.g.: Page A "relates to" Page B, Page A "has type" Page B...
  • Automated suggestion of relations based on a natural language processing analysis of the content.
  • Ability to create relations between pages of different wikis.

See also

This paragraph lists some initiatives that relate to the management of relations or software that implements a feature allowing to relate artefacts with one another:

  • RDF proposes the concept of triples: subject - predicate - object, that's a way to relate the subject and the object.
  • JIRA allows to link issues with one another with one of the following properties: blocks, depends on, duplicates, relates to.

Credits

The code of this application reuses code developed for the Tag Application.

Prerequisites & Installation Instructions

We recommend using the Extension Manager to install this extension (Make sure that the text "Installable with the Extension Manager" is displayed at the top right location on this page to know if this extension can be installed with the Extension Manager). Note that installing Extensions when being offline is currently not supported and you'd need to use some complex manual method.

You can also use the following manual method, which is useful if this extension cannot be installed with the Extension Manager or if you're using an old version of XWiki that doesn't have the Extension Manager:

  1. Log in the wiki with a user having Administration rights
  2. Go to the Administration page and select the Import category
  3. Follow the on-screen instructions to upload the downloaded XAR
  4. Click on the uploaded XAR and follow the instructions
  5. You'll also need to install all dependent Extensions that are not already installed in your wiki

For XWiki versions older than 10.4

This application requires the user interface extension point org.xwiki.platform.template.content.header.after, which was introduced in XWiki 10.4RC1. In order to add this extension point to a previous version of XWiki, edit the file "contentview.vm" as follows:

[...]
<div class="xcontent">
  #template('contentheader.vm')
  #foreach ($uix in $services.uix.getExtensions('org.xwiki.platform.template.content.header.after'))
    $services.rendering.render($uix.execute(), 'xhtml/1.0')
  #end
  ## --------------------------------------------------------------------------
  ## Drop permissions as they are no longer needed. This allows us not to have
  ## to review the code below for security holes since nothing bad can happen.
  ## --------------------------------------------------------------------------
  $xcontext.dropPermissions()
  ## ----------------------------
  ## Display the rendered content
  ## ----------------------------
  <div class="row">
    <div id="xwikicontent" class="col-xs-12">
      #if ("$!contentvmexception" != '')
        #displayUnhandledException($contentvmexception)
      #else
        $renderedContent
      #end
    </div>
  </div>

</div>
[...]

Release Notes

v2.4

v2.3

v2.2

v2.1

v1.2

v1.1

v1.0

Dependencies

Dependencies for this extension (org.xwiki.contrib:application-page-relations-ui 2.4):

  • org.xwiki.contrib:application-page-relations-api 2.4
Tags:
    

Get Connected