menu
Channels
Team

Once renderer for multiple templates

December 3, 2020 at 6:40am

Once renderer for multiple templates

December 3, 2020 at 6:40am
Hi guys, How to use one renderer to create multiple templates? Can't find examples in v2?
Thanks, Laurence

December 3, 2020 at 6:52am
import { TemplateRegistry } from "/decentralized-renderer-react-components"; import { customTemplate1 } from "./coc"; import { customTemplate2 } from "./cbc";
export const registry: TemplateRegistry<any> = { COC: customTemplate1, CBC: customTemplate2 };
  • reply
  • like
I did it but still loading default page: This is the OpenAttestation default renderer You see this template because the certificate issuer misconfigured the template configuration of your document. Please check with the certificate issuer. More information is available in the documentation.
  • reply
  • like
It means that your configuration does not match correctly the certificate that you created/ In your certificate, template.name must be COC or CBC
  • reply
  • like
"$template": { "name": "CBC", "type": "EMBEDDED_RENDERER", "url": "https://issuer.ibs.edu.sg" },
  • reply
  • like
My configuration COC is working
  • reply
  • like
But CBC shows error.
  • reply
  • like
And CBC template can be shown nicely in storybook.
  • reply
  • like
storybook doesnt test the configuration it just load the component
  • reply
  • like
send me a cert to test
  • reply
  • like
COC is working, CBC not....I have compared these two but still can't figure out the reason.
  • reply
  • like
Do you have any suggestions?
  • reply
  • like
send me a cert to test
  • reply
  • like
how to send you file? wrapped one?
  • reply
  • like
you can host it anywhere (for instance gist.github and send me the link
  • reply
  • like
yes a wrapped document
  • reply
  • like
I have issued them on dev ropsten
  • reply
  • like
Thanks
  • reply
  • like
This is your deployed app => https://issuer.ibs.edu.sg/app.83cfc6d.js
if you search for COC, you will find a reference to it, however there is no reference to CBC. You probably didnt update to your last version
  • reply
  • like
you fixed your problem ?
  • reply
  • like
it is working now after updating netlify
  • reply
  • like
great to hear :)
  • reply
  • like