Copy a single table row from multiple pages to compile a table on another page

We are currently using MediaWIKI.

We have project status pages for every project. At the top of a project status page is a table with 1 row giving an overview of the project (Customer, ProjectName, Type of project, Team, Projectmanager, Status).

In MediaWIKI, we can mark this row with . Like this:

== Summary ==
{| class="wikitable"
!'''Customer'''
!'''Engagement'''
!'''<abbr title="Either 'Project', 'Service Budget', 'TAM' or 'Betriebsunterstützung'">Engagement Type</abbr>'''
!'''<abbr title="Format: {NAME OF TEAM}">Team</abbr>'''
!'''<abbr title="Format: {Name of Projektmanager}">Responsible Person</abbr>'''
!'''<abbr title="Either 'Non-education' or 'Education'">Customer Type</abbr>'''
!'''<abbr title="Format ISO 8601: yyyy-mm-dd hh:mm">Last Update</abbr>'''
!'''<abbr title="Either 'Escalated', 'Off track' or 'On track'">Overall Status</abbr>'''
!'''Details'''
<onlyinclude>
|-
|A Customer Name goes here
|A Project Description goes here
|Project
|Team1
|John Doe
|Non-education
|2023-06-19 16:35
|<span style="background: lightgreen">On track</span>
|[[Customer page/Project page|Project page]]</onlyinclude>
|}

On a project overview page, we have the same table, but now we include project pages. Every included results in 1 row of a project added to the overview table. Like this:

{| class="wikitable sortable"
!Customer
!Engagement
!<abbr title="Either 'Project', 'Service Budget' or 'TAM'">Engagement Type</abbr>
!<abbr title="Format: {NAME OF TEAM}">Team</abbr>
!<abbr title="Format: {Name of Projektmanager}">Responsible Person</abbr>
!<abbr title="Either 'Non-education' or 'Education'">Customer Type</abbr>
!<abbr title="Format ISO 8601: yyyy-mm-dd hh:mm">Last Update</abbr>
!<abbr title="Either 'Escalated', 'Off track' or 'On track'">Overall Status</abbr>
!Details
{{:Customer_Page_1/Project_Page_A}}
{{:Customer_Page_2/Project_Page_B}}
|}

The result is a neat overview of all projects that automatically updates when the Project Manager updates the row on his project status page.

Is something like this possible in xWiki?


Mit freundlichen Grüßen / with kind regards,

Arjen Hiemstra
Univention Professional Services - Project Manager

yes definitely possible (it’s even the strength of XWiki ;)).

You should look at XClass/XObjects. In short:

  • You define an XClass
  • When you create a new page you create an XObject of that XClass
  • You define a Sheet page to decide how to display pages with XObject data and how to edit this data
  • You can even create a template page so that new pages of this type can be created and they’ll have that XObject automatically.

See https://www.xwiki.org/xwiki/bin/view/Documentation/DevGuide/DataModel/ and https://www.xwiki.org/xwiki/bin/view/Documentation/DevGuide/Tutorials/FAQTutorial/

Thanks

Can you shed some light into how that would work?

I guess I need to define an xClass called “ProjectClass”. This xClass defines all the properties of a project (start date, end date, customer, project name etc. etc.).

Are xClass and Application synonyms?

A page created with that xClass, can be used to display all projects, add a new project, display all project properties and delete projects.

New projects can be created by clicking the AddNewEntry button. This will use the sheet that determines how a single project is being displayed. Default values come from the template.

The same sheet can also be used to see the details of an existing project, as the live table of the page containing the Application could just show a few properties.

So the concept of a project page as we have it today would be gone. When doing the above, we no longer have a “project page” as each project is an object from the page using the Projects Application we created. The equivalent of the Project Page in MediaWIKI would be a sheet for a certain instance/object, correct?

Can I have direct URLs to the sheet of a certain instance/object?

Can I have a totally unrelated page that displays the properties of a certain instance/object of the central place where projects are being entered, together with more text not present in the properties of a project? This would be for display purposes only.

Can I have a totally unrelated page that shows all projects of the central place where projects are being entered - so like a duplicate live table? This would be for display purposes only.


Mit freundlichen Grüßen / with kind regards,

Arjen Hiemstra
Univention Professional Services - Project Manager

No. An XClass is just a data structure.

Yes

No. An instance of an XClass is an XObject. You put XObjects into wiki pages, and you fill it with data for each properties. So if you have an XClass representing a project, then a wiki page with an XObject of that XClass represents one project with its data (start date, project name, etc).

There are various options for creating new projects. I can think of 2 easy ones:

  • You create a template providerhttps://extensions.xwiki.org/xwiki/bin/view/Extension/Administration%20Application#HPageTemplates and then users can create new pages, choosing your “Project” template
  • You provide a UI in some wiki page to create new projects, delete them, etc. This can be done using Appl Within Minute or created manually.

The best is that you follow the different FAQ tutorials, that should give you all the info you need.

Thanks

I have followed that tutorial, but it does things slightly different from what we are discussing here.

So if I understand you correctly above:

  1. I can create an xClass, which defines the properties for a project.
  2. I can then create a single page for every project that represents an xObject for that xClass.
  3. I can create a template that makes creating new project pages with a new xObject easier.

So far so good. But I if I now want to create an overview page listing all xObjects for the xClass “Project”, how would I do that? Does the class “know” which xObjects have been defined for it? So is it as easy as creating a page that lists all xObjects defined for the xClass “Project”?

Appreciate your help. We are in the process of deciding if we should migrate from MediaWIKI to xWiki and this is currently working smoothly in MediaWIKI. We want to make sure that migrating to xWiki is an improvement in this area as well.


Mit freundlichen Grüßen / with kind regards,

Arjen Hiemstra
Univention Professional Services - Project Manager

Correct.

This is in the tutorials:

Thanks

Note to self that we should now improve the FAQ tutorial to replace LiveTable with LiveData as it’s more recent and even more powerful. See https://extensions.xwiki.org/xwiki/bin/view/Extension/Live%20Data%20Macro/

1 Like