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

Create a Custom Content Type
Create Your CCT as an Extension
Create the Entry Point JavaScript Files
Implement the View File
Implement the Sass Files
Test and Deploy the CCT Extension
Extensibility API Reference

General Notices