Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Attribute Name

Attribute Value

...

index

Name

Parameter

Events

Event Name

Data Type

number

To render a content item, the index attribute must be present with a value corresponding to the item’s index in the items array.

Default Template

Code Block
breakoutModewide
languagehtml
<div class="content-zone">
    {{#each items}}
        {{#if (eq type 'custom')}}
            <hawksearch-custom-content index="{{@index}}"></hawksearch-custom-content>
        {{/if}}
        {{#if (eq type 'featured-items')}}
            <hawksearch-featured-items-content index="{{@index}}"></hawksearch-featured-items-content>
        {{/if}}
        {{#if (eq type 'image')}}
            <hawksearch-image-content index="{{@index}}"></hawksearch-image-content>
        {{/if}}
        {{#if (eq type 'popular-queries')}}
            <hawksearch-popular-queries index="{{@index}}"></hawksearch-popular-queries>
        {{/if}}
    {{/each}}
</div>