Adding new certificate templates which use file collections to reference resources should have the following folder and file structure to support versioning and keep it clean.
Example directory/file structure in the org's file collection:
templates\CertificateResources\common\[css files + version number]
\[any other common files referenced by a certificate template + version number]
templates\CertificateResources\[cert file name (without .cshtml)]\[cert image file names + version number]
Certificate Template directory configured in the service app.config:
[org name]\[cert file name].cshtml (will be overwritten to release a new versions of the certificate template)
Note: Every certificate template file 'belongs' to a specific organization because all referenced files need to be in the org's file collection. To avoid confusion every certificate template file is added to a directory with the org's name. Certificate templates can only be shared between orgs if the referenced files are copied to all file collection of orgs who use that shared certificate template.
Example to add new certificate template version:
1. Existing certificate template (v1):
Files in org file collection: \templates\CertificateResources\HAGroupCertificate\Logo_v1.jpg
\templates\CertificateResources\common\GeneralPrint_v1.css
File in Certificate Template directory: \HA Group\HAGroupCert.cshtml
ShortId: HAGroupCourseCompletion1Y
2. Replace/overwrite the certificate template file HAGroupCert.cshtml with a new version (v2). If the new cshtml file is referencing different files, add those files to the org's file collection. Never overwrite an existing referenced file (i.e. css/image) because all referenced files on disc are used by awarded certificates.
Files in org file collection for v2: \templates\CertificateResources\HAGroupCertificate\Logo_v2.jpg (only if picture has changed)
\templates\CertificateResources\common\GeneralPrint_v2.css (only if css has changed)
File in Certificate Template directory: \HAGroup\HAGroupCert.cshtml
ShortId: HAGroupCourseCompletion1Y
0 Comments