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

Section: Templates, tags and CSS styles
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. You can easily test the tags in the tag playground.

Resource info

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
$(resource_site_name)Name of the planyo site the resource belongs to
$(default_price)Default price (first row in Pricing Manager)
$(total_resource_quantity)Total quantity as defined in resource settings
$(reserve_text) or $(S_RESRES)The text 'Make reservation' translated to the selected UI language.
$(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. Please note that if you made translations into other languages, this tag will give you the translated value. If you need the original value (independent of the language), then use the tag $(orig_prop_res_xxx)

See the table at the bottom of this page for possible property tags.
$(icon_prop_res_xxx)Prints the icon representing given custom resource property, if defined.
$(resource_property_list), $(resource_property_list:N)A listing of custom resource properties (optionally limited to the first N items when using the second version of the tag).
$(resource_currency), $(resource_currency_iso)Currency of the resource (second version always returns the 3-letter ISO code).
$(resource_property_checkbox_icons), $(resource_property_checkbox_icons:N)Prints icons of all the checkbox-type custom resource properties for the resource. This can be used to quickly list all available amenities.
$(resource_property_count), $(resource_property_name:x), $(resource_property_value:x), $(resource_property_val:x), $(resource_property_icon:x), $(resource_property_icon_name: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)
$(is_night_resource)Prints Yes if the resource is of overnight type or No otherwise
$(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), $(utz_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, if you want them printed use the tag e.g. $(timestamp:$(eventtime1)) -- see Q221 for the details of the tags to convert a timestamp to a printable time/date. The $(utz_event_timeX) tag can be used in the resource details and listing templates and will convert the time to the customer's time zone, use e.g. $(timestamp:$(utz_event_time1)) to print this as a readable date/time
$(resource_min_rental_time), $(resource_min_rental_minutes)Min. rental time of the resource, expressed as text -- 1st tag -- or as a number (in minutes) -- 2nd tag
$(resource_rating), $(resource_rating_votes), $(resource_rating_stars), $(resource_rating_showcase), $(resource_rating_showcase_simple), $(resource_rating_inline)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 (the _simple version does the same but doesn't show the stars). $(resource_rating_inline) prints customer reviews directly.
$(language)Currently chosen language
$(unit_property_UUU_PPP:TTT)Prints the value of a custom unit property for the specified time. TTT is the time for which the value should be read, UUU is the unit name and PPP is the property name, e.g. $(unit_property_unit 1_km count:$(start_timestamp)) would return the value of km count for unit unit 1 at rental's start time

Images

Tag nameMeaning
$(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:parent), $(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 first version of the tag uses the parent element's dimensions and the second version uses the image's dimensions. The third one lets you specify the width and height of the original image in pixels, e.g. $(image_lightbox:300_300) will resize the image to 300x300px. The last 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.
$(rimages), $(rimagesXXX)Image thumbnails (optionally limited to XXX images) and allow viewing full-size images via a slideshow in a lightbox (similar to the $(image_lightbox:XXX) tags above but instead of a single image, a group of thumbnails are printed.
$(images), $(imagesXXX)Image thumbnails of the resource, optionally limited to XXX images, e.g. $(images5). Full-size images are not displayed.
$(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

URLs for end customer

Tag nameMeaning
$(resource_details_url), $(noreload_details_url), $(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 planyo.com. The second version will update the contents of the planyo plugin without reloading the page.
$(reserve_url), $(noreload_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 planyo.com. The second version will update the contents of the plugin without reloading the page.

Widgets

Tag nameMeaning
$(default_calendar), $(default_calendar_wide)Inserts the default availability preview calendar for the resource. The calendar style depends on the resource type. The second version inserts a wide calendar (at 100% of container width).
$(upcoming_calendar)Inserts the upcoming availability preview for the resource as an IFRAME
$(res_grid), $(res_gridXXX)Inserts the wide 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
$(flexible_resource_calendar?XXX)Inserts the flexible availability preview for the resource (no IFRAME). The preview can be fully controlled by passing additional parameters in place of XXXX. For the full list of the parameters that you can use see tag preview in Integrate with my website / widgets
$(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
$(calendar_preview_with_params?XXXX) Inserts a customizable calendar preview as an IFRAME. This tag can be used in place of all other calendar preview tags. The preview can be fully controlled by passing additional parameters in place of XXXX. For the full list of the parameters that you can use see Q173: I need to have more control over the calendar preview or in Integrate with my website / widgets you can use the calendar builder UI in order to get the exact value of the tag corresponding with the calendar type and settings chosen.
$(price_preview), $(price_preview_horizontal)Embeds the show price and availability widget, useful mostly in the resource details template. The second version prints a horizontal widget with all fields in a single row.
$(initial_form_fields), $(initial_form_fields_horizontal)Embeds the initial booking form fields widget, useful mostly in the resource details template. The second version prints a horizontal widget with all fields in a single row.
$(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).

Additional products

Tag nameMeaning
$(compatible_product_count), $(compatible_product_name:x), $(compatible_product_price:x), $(compatible_product_is_hidden:x), $(compatible_product_thumbnail_image_url:x)Tags related to additional products compatible with this resource. The first one returns the count of the products and the other tags return the name, price and url to the first image of a specific additional product. With $(compatible_product_is_hidden:x) you can test if the product is visible to the client or only to the admin. X is in the range from 1 to $(compatible_product_count). Use the $(foreach:xxx) tag in order to iterate across the products, for example: $(foreach:$(compatible_product_count)) $(compatible_product_name:$(it)) $(endfor)
In all templates in planyo 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: $(if) ... $(then) ... $(else) ... $(endif). They allow you to output different code based on a value of any tag. You'll find the details in Q207

See also other related FAQ questions:
Reservation tags
Planyo site tags
Universal tags
Back to Frequently Asked Questions