Landing Pages

For marketing campaigns, it is great to introduce URLs behind which a search-engine optimised product overview page becomes visible. Think of special pages for brands or a specific group of products such as round tables.

Prerequisites

Make sure you have followed the Installation guide.

Implementation

Displaying a landing page is similar to the product lister page. The main difference is in how the default selection is applied, using the parameters option.

Example: a landing page for blue Tweakwise products:

<script>
  window.addEventListener('twn.starter.ready', function () {

    const listerPage = tweakwiseListerPage({
      cid: "CID",
      output: "#tweakwise-output",
      parameters: 'brand=Tweakwise&color=blue'
    });

  });
</script>

Notes:

  • Replace CID with the ID of the category you want to show.
    This ID should be known in Tweakwise, as provided through the feed or Backend API.
  • Replace output with the container you want to target
  • Populate parameters with the desired default selection.
  • Make sure auto-initializaton is off. Go to Plugin Studio Search & Merchandising settings.
    In the Advanced tab, check the Auto-initialization section. The toggle should be set to off.

Template Overrides

By default, the filtertemplate, sortingtemplate and buildertemplates connected to the selected category are used.

If you want to use a different template, use the filterTemplateId, sortingTemplateId, builderTemplateId options:

<script>
  window.addEventListener('twn.starter.ready', function () {

    const listerPage = tweakwiseListerPage({
      cid: "CID",
      output: "#tweakwise-output",
      parameters: 'brand=Tweakwise&color=blue',
      filterTemplateId: 1,
      sortingTemplateId: 2,
      builderTemplateId: 3
    });

  });
</script>