IMAmuseum / tap-cms

Authoring tools for the TAP mobile application software platform, built on top of Drupal. Learn more about the project at TAPintoMuseums.org.
https://github.com/IMAmuseum/tap-cms/wiki
GNU General Public License v3.0
24 stars 8 forks source link

Where is "nextStopPath" defined? #42

Closed prash-nk closed 9 years ago

prash-nk commented 9 years ago

I want the tap web app to display a 'next' button to go to the next stop defined on a tour. I've noticed references to this in various templates:

<% if (!_.isUndefined(nextStopPath)) { %> <a href="<%= nextStopPath %>" data-role="button" class="next-button">next</a> <% } %>

As well as the views: nextStopPath: this.getNextStopPath(),

However, I am not seeing any output of this. I have the tour configured to have codes for each stop, and was wanting to have a next button that would go to the next item on the tour stops list. Is there any additional config needed to be done to make this happen? I assume there must be a built in method to do this so I wanted to ask before I look into how I can implement it easily.

Thanks!

kjaebker commented 9 years ago

This is built to utilize TourML connections. So if you want to use this, you will need to add a field to each stop type that is a node reference. This field could be called "Next Stop". Then when entering the content you would select the stop that should follow the one your editing.

When setting up this field you will need to go into the Content type and set the TourML Display for that field to be a TourML Connection.

prash-nk commented 9 years ago

Great, that got it working. Now theoretically can the placement of the 'next' button go in the header area? Opposite of the back button? I see some code for social media items (which I did not see how to enable--this could be a secondary question for you) and I assume I can replace this code with a code for button, my concern is that since its located in the header, would I still pick up the 'next stop' code from the content area?

Thanks again you've been awesome!

kjaebker commented 9 years ago

That would require a bit of work to make that happen. I think you would have to go in and add the button and then have it update on every navigation to look at the current stop to see if a next button should be there.

prash-nk commented 9 years ago

Gotcha, thanks!

Is there any documentation on the social buttons/popup code yet?

kjaebker commented 9 years ago

to enable the social pop-up you need to add the following to your config:

social: { enabled: true, title: 'Share TAP', facebook: { appID: '' } }

Its been a while since I've tested this, but I think it should still work.

prash-nk commented 9 years ago

Wonderful, that works great. Thank you!