Q205: Which tags can I use to represent data specific to my resources?

Vous êtes ici: checkin24-7 » Aide » Questions Fréquemment Posées (FAQ) » Q205: Which tags can I use to represent data specific to my resources?
In all templates which have access to resource details (customized messages, invoice, shopping cart contents) you can use the following tags which represent values specific to given resource. You can use these tags no matter if you are editing the template in WYSIWYG or HTML mode. Tags whose value is empty will be replaced with empty text.
Tag nameMeaning
$(resource_id) ID of the resource
$(resource) or $(name) Resource name
$(desc) Description of the resource
$(descXXX) Description of the resource limited to XXX characters, e.g. $(desc100) will show the first 100 characters of the description
$(url) URL of the page with the resource description. This can be a page on your website if you're using advanced integration, or else it's a page on checkin24-7.com.
$(default_price) Default price (first row in Pricing Manager)
$(total_resource_quantity) Total quantity as defined in resource settings
$(reserve_url) URL of the reservation page for the resource. This can be a page on your website if you're using advanced integration, or else it's a page on checkin24-7.com.
$(reserve_text) or $(S_RESRES) The text 'Make reservation' translated to the selected UI language.
$(image_lightbox:auto), $(image_lightbox:WIDTH_HEIGHT),
$(image_lightbox:WIDTH_HEIGHT_IMGNUMBER)
These tags show a single large image. Hovering over the image tells the visitor that a slideshow is possible. Clicking on the image opens a slideshow in a lightbox. The second version of the tag lets you specify the width and height in pixels of the original image, e.g. $(image_lightbox:300_300) will resize the image to 300x300px. The third version lets you choose a different image to be printed, e.g. $(image_lightbox:auto_auto_3) or $(image_lightbox:300_300_3) will originally show the 3rd image of the resource.
$(image_viewer:auto),
$(image_viewer:WIDTH_HEIGHT), $(image_viewer:WIDTH_HEIGHT_IMGNUMBER)
These tags are similar to the preview tag as they show a single large image. The difference is that instead of showing a lightbox-based slideshow, this tag lets the customer browse through all the images in place using left/right arrows shown when hovering over the image. The second version of the tag lets you specify the width and height in pixels of the original image, e.g. $(image_lightbox:300_300) will resize the image to 300x300px. The third version lets you choose a different image to be printed, e.g. $(image_lightbox:auto_auto_3) or $(image_lightbox:300_300_3) will originally show the 3rd image of the resource.
$(images), $(imagesXXX) Image thumbnails of the resource, optionally limited to XXX images, e.g. $(images5).
$(rimages), $(rimagesXXX) Another type of image thumbnails, these will have the right alignment (optionally limited to XXX images) and allow viewing full-size images.
$(large_image_url), $(large_image_urlX) URL of the large version of the resource images. Use $(large_image_url) for the first image, then $(large_image_url2), $(large_image_url3) etc. for subsequent images
$(square_image_urlX), $(thumbnail_image_urlX) Square versions (big and thumbnail) of the image number X
$(image_count) Total number of images of this resource
$(image_title), $(image_titleX) Titles of resource images. Use $(image_title) for the title of the first image, then $(image_title2), $(image_title3) etc. for subsequent image titles
$(prop_res_xxx) One of the custom resource properties defined by you in Custom Resource Properties, e.g. $(prop_res_capacity) if 'capacity' is a defined property for your resources. Non-alphanumeric characters, including space characters, need to be replaced with underscores.

See the table at the bottom of this page for possible property tags.
$(resource_property_count), $(resource_property_name:x), $(resource_property_value:x) Tags which allow you to get all the custom resource properties, where x is the index (1, 2, 3, ...). Usually they should be used with the $(foreach:xxx) tag. See the $(prop_res_xxx) tag above if you want to fetch the value of a specific property.
$(resource_admin_name), $(resource_admin_email), $(resource_admin_id) Name, email and ID of the resource admin (if defined for the resource)
$(resource_granulation) Minimum time unit the resource works with, expressed in minutes. The possible values are: 15 (quarter-hour time slots), 60 (hour time slots), 1440 (full-day or night slots)
$(upcoming_preview) Inserts the upcoming availability preview for the resource as an IFRAME
$(site_upcoming_preview) Inserts the upcoming availability preview for the whole site as an IFRAME
$(res_grid), $(res_gridXXX) Inserts the hourly schedule grid for the resource (optionally for XXX days; the default is 7) as an IFRAME
$(res_grid_narrow) Inserts the narrow hourly schedule grid for the resource as an IFRAME
$(res_av_previewXXX), $(res_nox_previewXXX) Inserts the monthly availability preview for the resource for XXX months, e.g. $(res_av_preview3) for 3 months. $(res_nox_previewXXX) works like $(res_av_previewXXX) but uses background color instead of X to mark unavailable days
$(res_av_hor_previewXXX) Inserts the horizontal availability preview for the resource for XXX days, e.g. $(res_av_hor_preview7) for 7 days
$(goog_map_res), $(goog_map_res_W_H), $(goog_map_res_W_H_Z), $(goog_map_res_W_H_Z:params) Embeds a google map with the position of the resource. You can optionally set the map width and height (W and H in the tag) and also the default zoom (Z). If omitted, width and height will be set to 100 pixels and zoom level will be 12. E.g. $(goog_map_res_200_200_11) will use the size of 200x200 pixels with the zoom level of 11. You can also add a colon to each of these tags and then pass additional parameters mentioned in Q200, such as using the satellite map type, e.g. $(goog_map_res:map_type=satellite).
$(language) Currently chosen language
$(reserved_quantity_at_time:XXX) Quantity reserved at given time. Time can be a timestamp, a date or date with time, e.g. for day-based resources you can use the tag: $(reserved_quantity_at_time:2014-12-31). You can also show the quantity reserved currently: $(reserved_quantity_at_time:$(date)). Using extra tags you can also calculate the number of available (non-reserved) places: $(calc:$(total_resource_quantity) - $(reserved_quantity_at_time:$(date)))
$(event_time_count), $(event_time), $(event_timeX) For event-type resources, you can use these tags to get the event times: $(event_time) or $(event_time1) will return the first date, $(event_time2) the second, etc.. The times will be expressed as timestamp, check Q221 for the tags to convert a timestamp to a printable time/date.
$(resource_rating), $(resource_rating_votes), $(resource_rating_stars), $(resource_rating_showcase) When you allow your customers to add reviews (see FAQ 260), the tags output resource rating (average of added ratings, from 1 to 5), number of submitted reviews and rating shown as stars. The tag $(resource_rating_showcase) prints a box with rating preview; after clicking the box, a pop-up window opens with all customer reviews listed.
In all templates in checkin24-7 you can use the tag $(S_XXX) which represents any text visible to your clients. It makes sense to use such tags, e.g. $(S_RESRES) which will output "Make reservation" instead of the plain text version because the text will be translated automatically to client's language. to find out the IDs of given text, you can go to Site Settings / Customized translation and when you search for texts containing given keyword, you'll see the keyword ID in the left column.

Another very useful feature you can use in your templates are conditional statements. They allow you to output different code based on a value of any tag. You'll find the details here

See also other related FAQ questions:
Reservation tags
checkin24-7 site tags
Universal tags