Help talk:Displaying information

Displaying nested properpies on the same query
Hi everyone, I would like to display in the same query properties of a page which is related to the pages im querying for.

Let's say I would like to query all the pages in the City category, which are located in Germany, and I want to display the title of the page, but also I want to display the surface data of Germany, for example.

Something like this:

I know this wont work, but you can see what I want to achieve.

Thanks in advance!

Question
Okay... I appear to be missing something.

Let's say we have a page with multiple Has Related Page values. In other words, a one-to-many relationship between pages. If I perform a {{#show query or whatever to return those values, how would I format them into an unordered list? Simply typing format=ul doesn't work, since the values are for the same page. A simple template=whatever doesn't work, since all values are passed as the first argument.

This seems to me like it'd be one of the simplest things for a user to be able to accomplish, and yet I'm unable to find any information concerning it. I figure I'm missing something obvious.
 * 68.224.44.77 06:08, 12 August 2010 (UTC)


 * The options are actually pretty limited right now, sadly, for displaying multiple values for the same page. What do you mean by "unordered list", though? Yaron Koren 13:48, 12 August 2010 (UTC)

Adding a 'constant' column to the output of a query?
Is there a printout statement for creating an output column containing the same value for every query result? Something like:

 

which would give a table like:

Why would I want to do that? Because I'd like to use a template for formatting, and I want to pass a constant string/page/number to that template as an argument, along with all the query results. The constant value might be  , which would allow that template to know who is wanting the query results formatted. Alternatively, the constant value might be text that goes in front of each query result, allowing one page to pass in * as the constant value, and print the output as a list:


 * +1. 178.72.112.204 14:33, 18 June 2011 (CEST)
 * Berlin contains 3,391,409 people
 * Munich contains 1,259,677 people
 * Stuttgart contains 595,452 people

While another page might want to nest the output into a lower-level list by passing in ** as the constant value:


 * Germany:
 * Berlin contains 3,391,409 people
 * Munich contains 1,259,677 people
 * Stuttgart contains 595,452 people

If there isn't such a 'constant' printout statement, is there a workaround to send an extra column to a query-display template? Or is there another built-in way to accomplish this that I'm just missing?

quirkster (76.76.146.52 21:05, 3 November 2010 (CET)) 62.231.186.17 05:32, 12 July 2011 (CEST)
 * +1. 178.72.112.204 14:34, 18 June 2011 (CEST)
 * Workaround:  .

Displaying All Information
Is there a way to display all the information about a query?

For example, instead of this

is there a way to display all of the properties within a query?

Display Previous and Next Items
I have many pages that are concerts that occur. These have page names that show that date, but there are not pages for every date, only the ones that have concerts. Is there a way to display on a page links to the Previous and Next date pages that do exist, using an inline query or similar?

modify the examples
Hi everyone! I think it's possible to make this page more clear if use ask-queries as an examples or provide screenshots of Special:Ask and links to it. In this case the reader will have some idea of how to use printout statements even if she hasn't read anything else. Can I try to modify the page with this? Yury Katkov 06:16, 11 January 2012 (CET)


 * Yeah, I think so too. Would you start at the Russian page for me to see what you are exactly thinking about? Cheers --&#91;&#91;kgh&#93;&#93; 12:41, 11 January 2012 (CET)
 * Sure, I'm translating this page to Russian right now. Yury Katkov 06:09, 12 January 2012 (CET)

Show only X chars of a text value
Hi. I use Text properties, which are very long. How can I show only 100 bytes, 200, etc, instead of the entire value? Emijrp 13:44, 22 January 2012 (CET)


 * Good question. Nice to know if and how this may be achieved. Currently I cannot think of a solution. Perhaps you might want to try the user mailing list. Cheers --&#91;&#91;kgh&#93;&#93; 14:42, 22 January 2012 (CET)


 * Yaron replied this on IRC and it works: you should have the template also store a substring of the abstract using another property, using #set and #sub  Emijrp 01:44, 30 January 2012 (CET)


 * Great, I will give it a try myself and add a tip at smw.referata.com. Thanks and cheers --&#91;&#91;kgh&#93;&#93; 13:56, 30 January 2012 (CET)

Table cols width
Hi. When displaying an #ask into a table, how do I modify the width for every column? Thanks. Emijrp 15:06, 22 January 2012 (CET)


 * Yaron replied this on IRC: You can modify the width using CSS - add it to the page MediaWiki:Common.css Emijrp 01:46, 30 January 2012 (CET)

Missing information in the documentation
Hi, I think that the answer to the first question on this page should be in the documentation. Information that I miss in the documentation: Thanks! --AdSvS 10:23, 2 April 2012 (CEST)
 * 1) what is and what isn't possible in displaying individual values of properties when there are more values of that property.
 * 2) use of the option to print a bulleted list, when the ',' works well as a separator (that is if the value itself doesn't contain any comma's).
 * 3) what to do when the option above doesn't work or isn't sufficient. (use subobjects instead?)