Quantcast

Formatting the results of #ask queries

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Formatting the results of #ask queries

St-Germain, Jimmy
Hello Mediawikites,

Is there a way to do the following?
- set the width of a statement produced by an #ask query to a fixed width
- control the font size of text appearing within a statement produced by an #ask query
- control the column width within a statement
- control the line height within a statement

Thanks!




Jimmy St-Germain
Coordinator, Music Service Department | Legal and Business Affairs
8400, 2nd avenue, Montréal (Qc), Canada, H1Z 4M6
(514) 723-7646 ext. 7178
[hidden email]


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Formatting the results of #ask queries

Eggleston, Gabriel (NIH/NHGRI) [C]
If you're using the table format you can use any normal Mediawiki table formatting. You can also use CSS to specifically target the SMW outputs or particular columns/rows. Details are here: https://www.semantic-mediawiki.org/wiki/Help:Table_format#Applying_CSS_formatting

If you want to get really fancy you might need to use the template format.

--
Gabriel Eggleston
NHGRI Contractor – CSRA
[hidden email]

-----Original Message-----
From: St-Germain, Jimmy [mailto:[hidden email]]
Sent: Tuesday, May 9, 2017 16:17
To: '[hidden email]' <[hidden email]>
Subject: [Semediawiki-user] Formatting the results of #ask queries

Hello Mediawikites,

Is there a way to do the following?
- set the width of a statement produced by an #ask query to a fixed width
- control the font size of text appearing within a statement produced by an #ask query
- control the column width within a statement
- control the line height within a statement

Thanks!




Jimmy St-Germain
Coordinator, Music Service Department | Legal and Business Affairs 8400, 2nd avenue, Montréal (Qc), Canada, H1Z 4M6
(514) 723-7646 ext. 7178
[hidden email]


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Formatting the results of #ask queries

St-Germain, Jimmy
Hello Gabriel,


I was asking in the context of an #ask query.


The page you provided doesn't really explain (that I can see) how to apply CSS within an #ask query.


Any ideas?


________________________________
De : Eggleston, Gabriel (NIH/NHGRI) [C] <[hidden email]>
Envoyé : mercredi 10 mai 2017 11:52:55
À : St-Germain, Jimmy; '[hidden email]'
Objet : RE: Formatting the results of #ask queries

If you're using the table format you can use any normal Mediawiki table formatting. You can also use CSS to specifically target the SMW outputs or particular columns/rows. Details are here: https://www.semantic-mediawiki.org/wiki/Help:Table_format#Applying_CSS_formatting

If you want to get really fancy you might need to use the template format.

--
Gabriel Eggleston
NHGRI Contractor – CSRA
[hidden email]

-----Original Message-----
From: St-Germain, Jimmy [mailto:[hidden email]]
Sent: Tuesday, May 9, 2017 16:17
To: '[hidden email]' <[hidden email]>
Subject: [Semediawiki-user] Formatting the results of #ask queries

Hello Mediawikites,

Is there a way to do the following?
- set the width of a statement produced by an #ask query to a fixed width
- control the font size of text appearing within a statement produced by an #ask query
- control the column width within a statement
- control the line height within a statement

Thanks!




Jimmy St-Germain
Coordinator, Music Service Department | Legal and Business Affairs 8400, 2nd avenue, Montréal (Qc), Canada, H1Z 4M6
(514) 723-7646 ext. 7178
[hidden email]


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Formatting the results of #ask queries

Eggleston, Gabriel (NIH/NHGRI) [C]
Yup, this applies to the output of an #ask query. By default it uses the "table" format as detailed in the link below (unless you have "format=" in your #ask syntax.)

So if you have:

{{#ask: [[Category:Things]] | ?Foo | ?Bar }}

Then you can put this in your page MediaWiki:Common.css:

.smwtable .Foo {text-align: center;}

And it will center the text in the "Foo" column.


- Gabriel

-----Original Message-----
From: St-Germain, Jimmy [mailto:[hidden email]]
Sent: Wednesday, May 10, 2017 13:39
To: '[hidden email]' <[hidden email]>
Subject: Re: [Semediawiki-user] Formatting the results of #ask queries

Hello Gabriel,


I was asking in the context of an #ask query.


The page you provided doesn't really explain (that I can see) how to apply CSS within an #ask query.


Any ideas?


________________________________
De : Eggleston, Gabriel (NIH/NHGRI) [C] <[hidden email]> Envoyé : mercredi 10 mai 2017 11:52:55 À : St-Germain, Jimmy; '[hidden email]'
Objet : RE: Formatting the results of #ask queries

If you're using the table format you can use any normal Mediawiki table formatting. You can also use CSS to specifically target the SMW outputs or particular columns/rows. Details are here: https://www.semantic-mediawiki.org/wiki/Help:Table_format#Applying_CSS_formatting

If you want to get really fancy you might need to use the template format.

--
Gabriel Eggleston
NHGRI Contractor - CSRA
[hidden email]

-----Original Message-----
From: St-Germain, Jimmy [mailto:[hidden email]]
Sent: Tuesday, May 9, 2017 16:17
To: '[hidden email]' <[hidden email]>
Subject: [Semediawiki-user] Formatting the results of #ask queries

Hello Mediawikites,

Is there a way to do the following?
- set the width of a statement produced by an #ask query to a fixed width
- control the font size of text appearing within a statement produced by an #ask query
- control the column width within a statement
- control the line height within a statement

Thanks!




Jimmy St-Germain
Coordinator, Music Service Department | Legal and Business Affairs 8400, 2nd avenue, Montréal (Qc), Canada, H1Z 4M6
(514) 723-7646 ext. 7178
[hidden email]


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user
Loading...