Announcement: You can find the guides for Commerce 7.5 and later on the new Elastic Path Documentation site. The Developer Center continues to support Commerce 6.13.0 through 7.4.1.Visit new site

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:

  1. Navigate to the <Source Code Root>extensions/assets/ext-assets/src/main/assets/themes/electronics/default/templates/velocity/includes directory and open footer.vm
  2. Find the out of the box privacy policy link:
    <a href="#">#springMessage("footer.privacy")</a>
    
  3. Replace the link's href to point to $baseUrl/privacy.ep.
    <a href="$baseUrl/privacy.ep">#springMessage("footer.privacy")</a>