Q221: Which tags can I use universally, wherever tags are allowed?

Sie sind hier: checkin24-7 » Hilfe » FAQ » Q221: Which tags can I use universally, wherever tags are allowed?
You can use the following universal tags in all templates in checkin24-7.

Tag nameMeaning
$(language)Currently chosen language. This is in form of a 2-letter (ISO 639-1) language code (all capital letters e.g. EN, DE, FR, ES, IT)
$(language_choice), $(language_choice_narrow)Displays a drop-down which customers can use to change current language. This tag can be only used in advanced integration pages. The second version shows a very narrow drop-down, only with the language codes.
$(date)Today's date
$(date_diff+XXX:DDD), $(date_diff-XXX:DDD)Adds or subtracts XXX days from the date DDD and prints the resulting date. For example: $(date_diff+1:$(date)) would print tomorrow's date. $(date_diff-1:$(date)) will print yesterday's date.
$(S_XXX)This tag 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 Settings / Customized translation and when you search for texts containing given keyword, you'll see the keyword ID in the left column.
$(current_website)When using this tag in a condition, you can print different code depending on the website where checkin24-7 is being used. For simple integration it will be checkin24-7, for the facebook app, this will be facebook and for advanced integration on your website it will be the current domain name, e.g. www.testreservation.com
$(current_device)One of: mobile, tablet, desktop. This tag is useful for the templates where you'd like to output different content based on user's device.
$(calc:XXX)prints calculated result of the expression XXX. For example, $(calc:2+7) yields 9; $(calc:$(quantity)+1), where $(quantity) is the number of reserved resources (on templates that have access to reservation details), prints the number equal to $(quantity) + 1.
$(numeric:XXX)Converts the expression XXX into a numeric value. Empty or non-numeric value will be converted to 0.Useful inside of the $(calc:xxx) tag if one of the parameters might be e.g. empty
$(weekday:XXX), $(weekday_number:XXX)where XXX is date, prints a full textual representation of the day of the week in the first case and the day number (1 for Monday up to 7 for Sunday) in the second case. For example, $(weekday:25-08-2011) prints Thursday.
$(monthday:XXX), $(month:XXX), $(month_name:XXX), $(year:XXX), $(date_only:XXX)where XXX is date, prints a date component of this date. Can be either the month day (1-31), month (1-12), month name (January etc.), or year. The last tag prints a formatted date (without the time part).
$(hour:XXX), $(minute:XXX), $(time_only:XXX)where XXX is date/time, prints the hour or minute alone based on a complete date and time or time. The last tag prints a formatted time (without date part).
$(timestamp:XXX), $(print_timestamp:XXX)These tags let you do a convertion between date-and-time and a timestamp (number of senconds since 01.01.1970).
$(tolower:XXX), $(toupper:XXX)prints the XXX text converted to upper or lower case. For example, $(toupper:Hello) yields HELLO.
$(qrcode:XXX), $(barcode:XXX), $(barcode_TYPE:XXX)generates an image with the 2d QR (Quick Response) code representation of the XXX text or a 1d barcode. In case of the $(barcode) tag, you can specify the type of the 1d barcode (e.g. C39, C39E, C39PLUS, C39EPLUS, S25, I25, C128, EAN2, EAN5, EAN8, EAN13, MSI, PHARMA and many more can be used). Here's an example which encodes a URL $(qrcode:http://www.checkin24-7.com/). Of course you can use other tags inside of this tag, e.g. $(qrcode:$(site_url))
$(round:XXX)Returns the value of XXX rounded to the full number, e.g. $(round:3.4) prints 3 and $(round:4.6) 5.
$(floor:XXX)Returns the value of XXX rounded down to the nearest whole number, e.g. $(floor:4.77) returns 4. You can use this tag together with a number of other tags to return the age based on the birthdate, e.g. if your form includes a field called birthdate, the age in years can be returned with: $(floor:$(calc:($(print_timestamp:$(date)) - $(print_timestamp:$(prop_birthdate)))/(365*24*3600)))
$(mindigits_D:XXX)Returns the number XXX prefixed with as many zeros as necessary in order for the number to be D characters long. E.g. $(mindigits_4:12) would print 0012.
$(format_price:XXX), $(format_price_decimal_comma:XXX)Formats a price with grouped thousands. $(format_price:XXX) uses dot as decimal point and comma as thousands separator while $(format_price_decimal_comma:XXX) does the other way round. For example, $(format_price:EUR 10500.458) prints 'EUR 10,500.46' while $(format_price_decimal_comma:EUR 10500.458) prints 'EUR 10.500,46'.
$(ppp_xxx)This tag lets you read a custom parameter which you added to the attribute string. This can be any parameter but it must be prefixed with ppp_. For example, if your attribute string looks like this: mode=resource_list&ppp_param1=value1, then the tag $(ppp_param1) will be replaced with value1.
$(left_N:text), $(right_N:text)Returns the first or last N characters from given text. E.g. $(left_2:checkin24-7) returns ch.
$(nobr:text)Removes new lines (BR and P tags) from the text.


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
Resource tags
Site tags