🍨Extra Display Templates

USING A SINGLE DISPLAY TEMPLATE

To use a single display template (for instance MediaLandscapeSimple), do the following in the NativeAdHolder component.

  1. Assign MediaLandscapeSimple to the DEFAULT DISPLAY FORMAT field

  2. Uncheck the ADD EXTRA DISPLAY FORMATS field


ADDITIONAL DISPLAY TEMPLATES

The Display Handler Templates used in the default Ad Prefabs are:

  1. MediaLandscapeSimple

  2. MediaLandscapeBlur

  3. MediaPotrait

  4. NonMedia

In addition to the above display handlers, the SDK provides the following additional templates:

  1. LongHorizontalSimple

  2. LongVerticalSimple

These can be found in the path:

Assets/PubscaleSDK/NativeAds/Prefabs/DisplayTemplates/Dynamic/

To use these formats:

  1. Drag and drop the Display Template as a child to the SS_NativeAd or WS_NativeAd object

  2. Follow the steps from the 'USING A SINGLE DISPLAY TEMPLATE' section


CUSTOM DISPLAY TEMPLATES

  • If you create your own Custom Display Template, make sure to create a variant for portrait big image media as well.

  • This will ensure the Ad unit looks good when the ad big image media is in Portrait aspect ratio.

  • In this case you have to add your custom display variants to the Display Options array as shown in the steps below

  1. Set ADD EXTRA DISPLAY FORMATS field to Enabled

  2. Remove any default display templates that you don't want to use from Display options array

  3. Add your Custom display templates to the array for the SDK to pick at runtime depending on the Ad big media aspect ratio

  4. Done!

Custom Display Templates

Last updated