Page MenuHomePhabricator

Allow embedding pages of arbitrary content models in hub pages
Closed, ResolvedPublic

Description

CollaborationHubContent currently hardcodes supported subcontent types. This should not be the case. There should be two modes:

  1. Main page: A hub page containing simple list of subpages with its own special handling, which renders the index of pages (features) in the project
    1. If subpages are collaborationhub pages, it just fetches the content according to their content type contentmodel
    2. If subpages are arbitrary other contentmodels, it gets the contentmodel from mw and reuses the same functions as the above to actually include/render the content on the index page
  2. Subpage with arbitrary content: a hubpage with any other type of page embedded within it
    1. This uses the 'content' field to store content of any kind, as it should still all be text of some kind, regardless of what it is
    2. The contentmodel to use for this is stored as a 'content type' field (not necessarily the name used in practice, but you get the idea), and the appropriate contenthandler is used to render it within the hub

This will require a significant rewrite of how it currently handles content, but is needed.

Related Objects

Event Timeline

Harej renamed this task from Allow embedding subpages of arbitrary content models in hub pages to Allow embedding pages of arbitrary content models in hub pages.Jun 4 2016, 11:33 PM

We decided that although architecturally the system should support arbitrary content models, the UI will only make select options available.

Change 306617 had a related patch set uploaded (by Isarra):
Reimplement content (transcluded features) for collaborationhubs

https://gerrit.wikimedia.org/r/306617

Change 306617 merged by jenkins-bot:
Reimplement content (transcluded features) for collaborationhubs

https://gerrit.wikimedia.org/r/306617