# Certificate Display

**URL:** <https://community.blockcerts.org/t/certificate-display/1595>\
**Category:** Technical\
**Created:** [December 30, 2018, 6:01pm UTC](https://community.blockcerts.org/t/certificate-display/1595 "2018-12-30T18:01:53Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![cheuknam](https://avatars.discourse-cdn.com/v4/letter/c/e9bcb4/32.png) [@cheuknam](https://community.blockcerts.org/u/cheuknam)\
**Post date:** [December 30, 2018, 6:01pm UTC](https://community.blockcerts.org/t/certificate-display/1595/1 "2018-12-30T18:01:53Z")

</div>

I have several questions regarding the display of certificate, both on the web and on the mobile app.

1. For the displayHTML field, do we need to hardcode the layout of the certificate?
2. Can we make use of cert-viewer to design and embed the layout into the certificate? If yes, how to do that?
3. I looked at the sample issued certificates which come with embedded layouts, when I look at the JSON file, there isn’t any displayHTML field on it, I am curious how that is achieved.

Thanks for the help!

---

<div class="post-metadata">

**Author:** ![aronning](https://avatars.discourse-cdn.com/v4/letter/a/47e85d/32.png) [@aronning](https://community.blockcerts.org/u/aronning)\
**Post date:** [January 14, 2019, 7:54pm UTC](https://community.blockcerts.org/t/certificate-display/1595/2 "2019-01-14T19:54:33Z")

</div>

> [@cheuknam](#):
>
> For the displayHTML field, do we need to hardcode the layout of the certificate?

Roughly speaking, yes, at least a template.

Cert-tools has the concept of replacing certificate variables with values in the roaster file. So you may either create a certificate template that has `displayHtml` hardcoded to be the same for each person, or you can add `displayHtml` to one of the variables that gets replaced.

For the latter option, you’d need to create your own functionality that dynamically creates the `displayHtml` uniquely for each person and sticks that in the roaster file. Or fork cert-tools and create the code needed to replace `displayHtml` elements with roster specific information, such as name.

> [@cheuknam](#):
>
> Can we make use of cert-viewer to design and embed the layout into the certificate? If yes, how to do that?

Easiest option would be to just create the html like you would normally and insert that as your template (or whatever custom tool you use to dynamically create html).

> [@cheuknam](#):
>
> I looked at the sample issued certificates which come with embedded layouts, when I look at the JSON file, there isn’t any displayHTML field on it, I am curious how that is achieved.

I’m not sure which files you are looking at but there are some here with display html: [https://github.com/blockchain-certificates/cert-verifier-js/tree/master/test/fixtures](https://github.com/blockchain-certificates/cert-verifier-js/tree/master/test/fixtures)

---

<div class="post-metadata">

**Author:** ![gcervera](https://avatars.discourse-cdn.com/v4/letter/g/46a35a/32.png) [@gcervera](https://community.blockcerts.org/u/gcervera)\
**Post date:** [July 4, 2019, 8:01pm UTC](https://community.blockcerts.org/t/certificate-display/1595/3 "2019-07-04T20:01:11Z")

</div>

Hi guys, you mentioned this " you can add `displayHtml` to one of the variables that gets replaced." where and how do you replace that value? Would you mind to elaborate a bit more? Thank you.

---

<div class="post-metadata">

**Author:** ![gouravvc](https://avatars.discourse-cdn.com/v4/letter/g/f17d59/32.png) [@gouravvc](https://community.blockcerts.org/u/gouravvc)\
**Post date:** [August 21, 2020, 11:07am UTC](https://community.blockcerts.org/t/certificate-display/1595/4 "2020-08-21T11:07:01Z")

</div>

Hello ,  
I am facing issue to display dynamic value in certificate when we are using html inside roster file .  
Lets take Example -

Values inside roaster file : Name , pubkey , address , contact number ,html

From this roster file i want to display values like Name and Contact Number in certificate which i designed in html .  
How to display this values in certificate ?

Thank You ,  
Gourav

---

<div class="post-metadata">

**Author:** ![ampatt97](https://avatars.discourse-cdn.com/v4/letter/a/dfb087/32.png) [@ampatt97](https://community.blockcerts.org/u/ampatt97)\
**Post date:** [August 24, 2020, 5:51pm UTC](https://community.blockcerts.org/t/certificate-display/1595/5 "2020-08-24T17:51:10Z")

</div>

The way I worked around this was to populate the values for Name, pubkey,address, contact first, then use those values to build the static html elements around the dynamic entries. I used php to build the csv files so I had more control.
