Implement the Template File
The template is necessary to render the data defined by the view.
To implement the template file:
-
In the
ImageViewer/Modules/ImageViewerCCT/Templates
directory, openNetSuite_imageviewer_imageviewercct.tpl
. -
Create the HTML required to render the data defined by the view.
Based on the example
ImageViewerCCT
, your template might look similar to the following:<div class="imageviewercct"> <div class="imageviewercct-container"> {{#if hasImage}} <img class="imageviewercct-container-image" src="{{imageUrl}}" alt="{{imageAlt}}" /> {{/if}} {{#if hasText}} <div class="imageviewercct-container-caption imageviewercct-container-caption-{{valign}}"> {{#each texts}} <h2 class="imageviewercct-container-caption-title">{{this}}</h2> {{/each}} </div> {{/if}} </div> </div>
-
Save the template.
-
To continue creating an extension for a CCT, go to Implement the Sass Files