FAQ Q320: Which tags can I use to represent data specific to my meta-site?

Sekcja: Templates, tags and CSS styles
Within the context of a metasite you can use the following tags which represent values specific to given meta-site. 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.

Planyo metasite info

Tag nameMeaning
$(site_name)Name of the planyo metasite
$(metasite_id)ID of the metasite
$(site_desc)Description of your planyo meta-site.
$(shopping_cart_item_count)Number of items in the shopping cart.
$(is_user_logged_in), $(logged_in_reservation_list_url)The first tag becomes true if the current user is logged into your website. In such case the second tag gives you the URL you can use to let the user view all the reservations they entered in the past. You normally use these tags together in a conditional statement, e.g.:
$(if) $(is_user_logged_in) $(then) <a href='$(logged_in_reservation_list_url)'>Click to view all your reservations</a> $(endif)
This tag is only available when integration with your CMS login is enabled in your module settings.
$(is_moderator_user), $(is_customer), These tags can be used to find out if the current user is the metasite moderator/admin or a customer with no access to the backend.
$(buy_coupon_url), $(buy_coupon_url:RESID), $(buy_coupon_id_url:ID)URL of the page where the coupons can be purchased by your customers. The second version lets you specify the resource ID -- only the coupons compatible with this resource will be listed. The last version will only show the coupon(s) specified by ID (you can find the IDs on the 'Create coupons' page).
Before this tag can display any meaningful content, you'll first need to define the coupon types in the admin panel.

URLs for end customer

Tag nameMeaning
$(metasite_url)URL of the page with a list of all sites in the metasite. This is be a page on your website if you're using advanced integration, or else it's a page on planyo.com
$(shopping_cart_url)When using the shopping cart feature, this will be the URL of the page containing details of client's shopping cart and the checkout button. Please note that if want to use this URL outside of the planyo module (where tags cannot be used) you can add mode=show_cart to the URL of the page with the planyo module to link to the shopping cart contents.

Widgets

Tag nameMeaning
$(shopping_cart_widget), $(shopping_cart_widget_simple)Shopping cart widget showing the number of reservations and cart total with a link to the shopping cart page. This is the same widget which you can generate and place anywhere on your website in 'Integrate with my website'.
$(goog_map_metasite), $(goog_map_metasite_W_H), $(goog_map_metasite_W_H_Z), $(goog_map_metasite_W_H_Z:params)Embeds a google map with the position of all the resources in the planyo metasite. If the sites also have the coordinates entered in site settings, they will be also present on the map. 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_metasite_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_metasite:map_type=satellite).


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 META 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
Resource tags
Site tags
Universal tags
FAQ