-
Notifications
You must be signed in to change notification settings - Fork 8
MappingTourML
A bulk of the TAP tools provide the ability to map your custom Stop content types to TourML. This page describes that process, which is very similar to the process of managing the display of content types which is part of Drupal.
The screenshot below comes from our Image Gallery Stop example. It shows a newly created stop and its fields of data. You may notice that the "Images" field we added is not displaying. In Drupal, we can control the display of fields by managing them on the content type.

Navigate to "Admin -> Strcuture -> Content types -> Image Gallery Stop -> Manage Display". Be sure that "Default" is the selected display type. This is the screen where you can control the display of your fields of data. For our running example, be sure to configure the "Images" field like the screen below, having the label "Above", format as "Media", and file view mode as "Preview". Once you have done this, click "Save".

If you return to a node that is an Image Gallery Stop you will now see previews of your images inline with the content.

You'll also notice that your content has a tab called "TourML XML". If you click this tab you will see a screen similar to that below. You will notice that much of the field information is not included in the XML. We can address this virtually the identical way we did the images for the "View" tab.

Navigate to "Admin -> Structure -> Content types -> Image Gallery Stop -> Manage Display". Now select "TourML XML" as the display type in the upper-right hand of the screen. You can now map each of your fields to TourML.
- Code: Drag the "Code" field out of the hidden group and set the format to "TourML Property".
- Subtitle: Drag the "Subtitle" field out of the hidden group and set the format to "TourML Asset".
- Images: Drag the "Images" field out of the hidden group and set the format to "TourML Asset".
Once you have done this click "Save". Be sure to read up on TourML to better understand the differences between properties and assets.

Now if you revisit the "TourML XML" tab you will see that all your fields of content appear in the TourML XML. That's all it takes to map your content types for stops to TourML!

At this point you can see how manage language translations or see an example of mapping a third-party field type.
Have questions? Please ask on the mailing list.