HorizonWeb Online Support

        Using Dynamic Master Pages

HorizonWeb 4.2 onwards

Dynamic master pages allow you to display differently styled pages to different users. You will need to have:

  • Created a new master page that you want specific traders to use.
  • Created new stylesheets which the master page will use. If you are not confident coding in the CSS language, then ECi's Digital Services team offer e-commerce Website Design, a bespoke design service for your HorizonWeb site.
  • Know which traders you want to use the new master page.

Set up the new home pages

Each master page needs its own home page, because this is where the user will login.

  1. Log into HorizonWeb as an administrator
  2. Click Admin > HorizonWeb Designer > Edit Content Pages.
  3. In the Select a Page list, click Home then click Edit Page.
  4. Click in the code box, then press Shift+A to select all and Shift+C to copy.
  5. Click Create New Page. A text box opens in the row below the Create New Page button. Type a name for a new home page, e.g. for a separately branded Furniture site, HomeFurniture, then click the green tick. The Select a Page box will contain your new page name and the code box will be blank.
  6. Click within the code box, then press Shift+V to paste.
  7. Click Save Page. The message Saved Successfully is displayed.
  8. The available master pages are listed in the Master Pages box. The master page, which the content page inherits from, is near the top of the code box, and will look similar to [M:Master]. Delete this line, then click on the home page's master page. The new master page reference will be inserted.
  9. Click Save Page. The message Saved Successfully is displayed.

Set up traders in Horizon

Each user that logs into HorizonWeb is a contact on a trader. The home page viewed can be set for each trader. All contacts for that trader will see the same home page, and subsequently use that home page's master page. To set this up:

  1. Press F9 to open the Trader card.
  2. Search for the trader. The Details tab opens.
  3. Click Settings tab > Customer Settings tab > Web Welcome tab.
  4. In the box, type (or copy and paste):
    <script>
    window.location.replace("/HomeFurniture.aspx");
    </script>

    The page referenced in the script is the name of the home page, with an aspx file extension.
  5. Click Confirm.
  6. Repeat the above steps for each trader that should see a different master page design.

Edit content pages so that they inherit master pages dynamically

In this stage you need to edit every page (apart from the home pages) on your site, so they inherit the master page from the login page.

  1. Log into HorizonWeb as an administrator
  2. Click Admin > HorizonWeb Designer > Edit Content Pages.
  3. In the Select a Page list, click the page to edit and click Edit Page. Make sure that you do not change a home page. The master page, which the content page inherits from, is near the top of the code box, and will look similar to [M:Master].
  4. Change this line to: [DynamicMasterPage].
  5. Click Save Page. The message Saved Successfully is displayed.
  6. Repeat step 3 until all the pages have been altered.

        Back To HorizonWeb Designer Options