Implement the Template File

The template is necessary to render the data defined by the view.

To implement the template file:

  1. In the ImageViewer/Modules/ImageViewerCCT/Templates directory, open NetSuite_imageviewer_imageviewercct.tpl.

  2. 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> 
    
                  
  3. Save the template.

  4. To continue creating an extension for a CCT, go to Implement the Sass Files

Related Topics

General Notices