3 - Linking to the static page
3 - Linking to the static page
After mapping your Privacy Policy page to the /privacy.ep URL, the link to the page is formed by appending the page's URL to the demo Storefront's base URL. For example:
http://demo.elasticpath.com:8080/storefront/privacy.ep
Linking to the page in Velocity
To link the demo Storefront's webpages to your Privacy Policy page, you need to modify the out-of-the-box Velocity templates.
Out of the box, the Velocity template footer.vm contains a Privacy Policy link that does nothing. For this tutorial, we'll modify this template so the link goes to the Privacy Policy page:
- Navigate to the <Source Code Root>extensions/assets/ext-assets/src/main/assets/themes/electronics/default/templates/velocity/includes directory and open footer.vm
- Find the out of the box privacy policy link:
<a href="#">#springMessage("footer.privacy")</a>
- Replace the link's href to point to $baseUrl/privacy.ep.
<a href="$baseUrl/privacy.ep">#springMessage("footer.privacy")</a>