Would it be possible for you to replicate the original problem on one of the "sandbox" wikis, like http://sandbox.semantic-mediawiki.org or http://scratchpad.referata.com? That would make it much easier for everyone to see and diagnose the issue.

For the ordering problem - that's unfortunately really a missing feature in SMW - you can only sort on one column. The 'outline' format could do its own sorting, but then that would lead to odd results when the user clicked on things like 'next 20 results' - there would be no obvious order between one page of results and the next. My recommendation is to sort on the outermost outline property: it's not an ideal solution, but I think it's the best one.


On Wed, Jul 29, 2009 at 10:15 PM, Scott Reed <sreed@avacoda.com> wrote:
I have not been able to figure this out. All my attempts result in cryptic warning messages. If someone could show me a simple example written out in full, I would really appreciate it.

I am also at a loss as to how to control the order of the outline levels. Each level of an outline needs to have its own sort order but the template only has an order for the inner level. I have an "order" property for each level. Is there a way to prepend the order to the text so everything will sort naturally?

Yaron Koren [7/27/2009 12:51 AM] wrote:
Unfortunately, there's no simple way to do this; the problem is that SMW's #ask queries don't allow for display of sub-properties. In other words, let's say A, B and C represent "City", "State" and "Country", respectively. What you want is something like:

{{#ask:[[Category::City]]|format=outline|? Has state|? Has state.Has Country|outlineproperties=Has state, Has state.Has country}}

...or, in other words,

{{#ask:[[Category::A]]|format=outline|? catb|? catb.catc|outlineproperties=catb, catb.catc}}

Unfortunately, though SMW lets you query on "Has state.Has country", it doesn't let you display it - which I think would be a great feature to have, especially for the "outline" format. Instead, you'll have to, in a sense, do it manually, by adding a "Has country" property directly to each "city" page, which would have to be done through a query. It's a bit of a mess, though much less so if you store "cities" using templates - that way you only need to add the awkward query once.


On Mon, Jul 27, 2009 at 12:02 AM, Scott Reed <sreed@avacoda.com> wrote:
Say I have a hierarchical page structure:
Category-A pages have a property, catb, with Category-B page values
Category-B pages have a property, catc, with Category-C page values
I want an outline with the following structure
Category-C page 1
  Category-B pages with catc=(Category-C page 1)
    Category-A pages with catb=(Category-B pages with catc=Category-C page 1)
Category-C page 2
I have two-level category hierarchy outlines working fine but I don't understand this technology well enough to figure it out for more than two-levels. Any assistance would be much appreciated.


Semediawiki-user mailing list

Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
Semediawiki-user mailing list