statisticssweden / PxWeb

Web application for disseminating statistical tables
https://www.scb.se/pxweb
Apache License 2.0
35 stars 23 forks source link

Can I control the table title? #636

Closed johan-ejstrud closed 6 months ago

johan-ejstrud commented 7 months ago

I want to change the title, so it's not built by combining DESCRIPTION with the selected variables.

image

Ideally I want the title to be whatever I put i list in the TITLE keyword.

Is it possible to do so?

I tried setting DESCRIPTIONDEFAULT=NO, which doesn't seem to work. I have tried reading the definitions of

but can't figure out if it's possible.

johan-ejstrud commented 6 months ago

Hey @likp might this be possible? 😊

likp commented 6 months ago

@johan-ejstrud I looked at some old documentation that we have on this subject it says:

3 files that differ in DESCRIPTION and DESCRIPTIONDEFAULT

File 1 has only TITLE
File 2 has DESCRIPTION = "Population by counties in Sweden 2007-2008" File 3 has DESCRIPTION = "Consumer Price Index 2010=100" and DESCRIPTIONDEFAULT=YES

All 3 files has TITLE = "Static title" All 3 files has CONTENTS + variables (dynamic) = "Population by region, period and sex"

What to display in the user interface:

File 1 File 2 File 3
Tree view "Static title" "Population by counties in Sweden 2007-2008" "Consumer Price Index 2010=100 "
Variable selection "Static title" "Population by counties in Sweden 2007-2008" "Consumer Price Index 2010=100 "
Table presentation "Population by region, period and sex" "Population by region, period and sex" "Consumer Price Index 2010=100 "

So I think if you set DESCRIPTION=Account statistics investment and DESCRIPTIONDEFAULT=YES You will have Account statistics investment as the title on the pages that displays your table. But also that would be the title that is used when you browse for the table and when you select values for the table.

johan-ejstrud commented 6 months ago

Thank you @likp.

Setting DEFAULTDESCRIPTION=YES worked. It sets the title to be the same as description.

As far as I can tell it is not possible to control description and title sepratly then, but this will work for my application, thank you. 😊