You can do that in Semantic Forms already with the "category" and "categories" input types. Those require the CategoryTree extension to be installed, and they only work with categories. However, you can create a set of categories just for the sake of creating an SF input - the template doesn't need to add the page to the category selected; it can treat the selected value as just a normal property value. That would be a hack, but then again, categories are a very convenient way of defining hierarchies within MediaWiki.

If there were going to be an SMW-based way of defining hierarchy, though, I would think that, yes, it would require creating a separate page for each item. It may seem like overkill, but I can't think of another way to do it.


On Wed, Jan 16, 2013 at 11:43 AM, Yury Katkov <katkov.juriy@gmail.com> wrote:
Hi !

We're trying to create a form input for semantic forms that will allow
users to pick the value of a field from the hierarchy (tree). For
example we have hierarchical list of employee key competences that are
structured like this:

1. Withstand the negative health effects
1.1. Withstand the negative weather effects
1.1.1 Withstand the wind
1.1.2. Withstand the fire
1.2. Withstand the negative psychological atmosphere

... and so on.

We want to support such hierarchies and now are searching for a
flexible way for that. We want such hierarchies to be input from the
Semantic Forms and to be collapsible lists in the 'filtered' format.
Of course, our desire is that these objects be native to SMW, but it
seems unnecessary to to generate one page per hierarchy item

Any ideas on how to better represent such trees in SMW?

Yury Katkov, WikiVote

Master Java SE, Java EE, Eclipse, Spring, Hibernate, JavaScript, jQuery
and much more. Keep your Java skills current with LearnJavaNow -
200+ hours of step-by-step video tutorials by Java experts.
SALE $49.99 this month only -- learn more at:
Semediawiki-devel mailing list

WikiWorks MediaWiki Consulting http://wikiworks.com