Installing Stockist Store Locator on Umbraco
To set up your store locator, you'll first need to create a new macro (page component) which you can then add to one or more of your content pages.
To create a macro, follow these steps:
- In your Umbraco backoffice, click on the Developer section.
- Next to Partial View Macro Files, click the "..." (ellipsis) button to open the options menu.
- In the Create an item under Partial View Macro Files menu, choose New partial view macro.
- Enter a memorable title (e.g. Stockist Store Locator Partial) in the title field, then paste your account embed code into the text area, making sure to delete any previous content. When done, click Save.
- In the section menu, next to Macros, click the "..." (ellipsis) button to add a new macro.
- Choose a memorable name for your macro (e.g. Stockist Store Locator), then click Create.
- Next to MVC Partial View, choose the partial view file you just created.
- Ensure Use in rich text editor and the grid is selected, so you'll be able to add your macro to a content page. You can uncheck Render in rich text editor and the grid - your store locator won't load properly in your backoffice view, but will appear correctly once published to your site.
- Click Save to save the new macro.
Adding your store locator to a content page
Once you've followed the steps above to create a macro, you can create a new page add the macro to display your store locator.
To create the new page, follow these steps:
- In the left menu of your backoffice, click Content.
- In the section menu, next to Home, click the "..." (ellipsis) button to open the options menu.
- In the menu that opens, choose to create a new Content Page.
- In the title bar and the Page Title fields, choose a visitor-friendly page name, e.g. Store Locator.
- In the content area, choose to add a Full Width row.
- Click Add content in the row that appears.
- Choose to add a Macro.
- In the Select macro pane, choose to add the macro you created in the steps above.
- The macro you created should now appear in the content row.
- Click Save and publish to create the page on your site.
- Once saved, you can also click the Preview button to see the locator live on your site.