Question

How do I link to pages I have created in divshot from the navigation bar, while still staying in the divshot app.

When I preview, I want to be able to click on links in the navigation bar and go to different pages I have created.

Was it helpful?

Solution

We haven't built in the ability to link between pages in Divshot just yet, unfortunately. It's been one of our most frequently requested features and is something that we're working on putting in soon.

OTHER TIPS

A workaround is to make a function that zaps you to the page you want. When you finish the mockup you will be able to replace the code with the real function that changes the page.

<script>
var pages = [
  {name: 'page1', url: 'https://api.divshot.com/previews/whateverthelinktothepreviewpage1is'},
  {name: 'page2', url: 'https://api.divshot.com/previews/whateverthelinktothepreviewpage2is'}
  ]

function gotoPageByName( pageName ) {
  for ( var i in pages ) {
    if ( pages[i].name == pageName) {
      window.location = pages[i].url
    }
  }
}
</script>

then

<a href="javascript: gotoPageByName('page1');" class="btn">Change Page</a>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top