# Core - Content Link - Display name not working

**URL:** <https://discourse.getcockpit.com/t/core-content-link-display-name-not-working/2428>\
**Category:** Cockpit v2\
**Created:** [July 26, 2022, 7:55am UTC](https://discourse.getcockpit.com/t/core-content-link-display-name-not-working/2428 "2022-07-26T07:55:08Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sephen](https://avatars.discourse-cdn.com/v4/letter/s/ee7513/32.png) [@Sephen](https://discourse.getcockpit.com/u/Sephen)\
**Post date:** [July 26, 2022, 7:55am UTC](https://discourse.getcockpit.com/t/core-content-link-display-name-not-working/2428/1 "2022-07-26T07:55:08Z")

</div>

When creating a Content Link the display name does not show the value only the word you typed in the display name field.

{  
link: ‘specifications’,  
display: ‘number’,  
}

When leaving the field empty it shows the id.

![Screenshot 2022-07-26 at 09.50.38](https://canada1.discourse-cdn.com/flex030/uploads/getcockpit/original/2X/a/a3407e8e081157f77118def784ca9ff441cc4744.png)

---

<div class="post-metadata">

**Author:** ![creativeplusplus](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.getcockpit.com/creativeplusplus/32/844_2.png) [@creativeplusplus](https://discourse.getcockpit.com/u/creativeplusplus)\
**Post date:** [July 27, 2022, 3:52am UTC](https://discourse.getcockpit.com/t/core-content-link-display-name-not-working/2428/2 "2022-07-27T03:52:48Z")

</div>

It should be ${data.number} , missing in documentation

example :

 ![Screen Shot 2022-07-27 at 10.51.46](https://canada1.discourse-cdn.com/flex030/uploads/getcockpit/original/2X/3/39e0ed3437ffe6124d62e4aca45ec3841197a777.png)

---

<div class="post-metadata">

**Author:** ![Sephen](https://avatars.discourse-cdn.com/v4/letter/s/ee7513/32.png) [@Sephen](https://discourse.getcockpit.com/u/Sephen)\
**Post date:** [July 27, 2022, 6:17am UTC](https://discourse.getcockpit.com/t/core-content-link-display-name-not-working/2428/3 "2022-07-27T06:17:52Z")

</div>

Thanks!, that worked!

---

<div class="post-metadata">

**Author:** ![tschohnnny](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.getcockpit.com/tschohnnny/32/1163_2.png) [@tschohnnny](https://discourse.getcockpit.com/u/tschohnnny)\
**Post date:** [September 10, 2022, 1:21pm UTC](https://discourse.getcockpit.com/t/core-content-link-display-name-not-working/2428/4 "2022-09-10T13:21:50Z")

</div>

What about field sets? I want to display the content of the field called “favourite-thing”. Putting ${data.favourite-thing} in the Display field returns “n/a” in the form.

 ![Screenshot 2022-09-10 at 15.15.06](https://canada1.discourse-cdn.com/flex030/uploads/getcockpit/original/2X/1/19d4919e11847ab76a35921c24b61429af108e77.png)

---

<div class="post-metadata">

**Author:** ![artur](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.getcockpit.com/artur/32/4_2.png) [@artur](https://discourse.getcockpit.com/u/artur)\
**Post date:** [September 11, 2022, 12:31am UTC](https://discourse.getcockpit.com/t/core-content-link-display-name-not-working/2428/5 "2022-09-11T00:31:12Z")

</div>

In general I wouldn’t recommend to use kebab-case for field names but instead camel case: favouriteThing

But regarding your issue, this should work:

`${data['favourite-thing']}`

---

<div class="post-metadata">

**Author:** ![tschohnnny](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.getcockpit.com/tschohnnny/32/1163_2.png) [@tschohnnny](https://discourse.getcockpit.com/u/tschohnnny)\
**Post date:** [September 11, 2022, 11:36am UTC](https://discourse.getcockpit.com/t/core-content-link-display-name-not-working/2428/6 "2022-09-11T11:36:28Z")

</div>

Hi @artur  
Thank you very much for your quick answer! This does indeed work 😃

Just for future visitors:

If the field name is named with kebab case the solution is: `${data['favourite-thing']}`.  
If the field name is named with camel case the solution is: `${data.favouriteThing}`

I’ve added your recommendation of using camel case for field names to the docs: [Comparing Cockpit-HQ:main...tsch0hnny:patch-1 · Cockpit-HQ/docs · GitHub](https://github.com/Cockpit-HQ/docs/compare/main...tsch0hnny:docs:patch-1)

I’ve also updated the section “Set of fields” with the above: [Comparing Cockpit-HQ:main...tsch0hnny:patch-2 · Cockpit-HQ/docs · GitHub](https://github.com/Cockpit-HQ/docs/compare/main...tsch0hnny:docs:patch-2)

I’m new to contributing to docs, so please let me know if there’s a better location and/or wording.
