Selection field text

I’ve setup a select field in the panel with a few options

    company:  Company News
    weekly:   Weekly Update
    product:  Product Update

I can call it an get stuff like company, weekly and product.
But how can I get Company News, Weekly Update etc?

In the first line, company is the value that gets stored in the content text file and Company News is the value that gets displayed in the select field in the Panel. You can’t get the display value from your template.

The reason is that sometimes you need to have a unique key to use in conditional template code.

You can use the following code however:

    Company News: Company News
    Weekly Update: Weekly Update
    Product Update: Product Update

I think using the following should also work, but it seems like it doesn’t:

    Company News
    Weekly Update
    Product Update

I have created an issue over on GitHub about this.

You can also use a category map as described here

This is particularly useful if you are developing for a multi-language site, then you can define the string translations in your language files.

Thanks, using the category map now.