Shortcodes

Shortcodes are simple tags for creating dynamic text or embedding objects like is done in platforms such as WordPress.  Shortcode is adding using the following markup to text:

    {{template_name}}

Additionally, optional named parameters can also be passed to shortcodes:

{{template_name|paramName=value|param2Name=value2}}

Shortcodes can be useful for inserting predefined scripts or objects into HTML
without allowing cross-site scripting attacks. They can also be used to make common
html blocks easier to display or change.

Below is a listing of shortcodes that came with Segue.

Video Shortcode

video

This template will allow the embedding of Flash Video from a variety of sources. These sources must be configured by the Segue administrator if they are not included in the default configuration.

Parameters:

service
The service at which this video is hosted — all lowercase. Examples: youtube, youtube_playlist, google, vimeo, hulu
id
The Id of the video, the specific form of this dependent on the service, but generally this can be found in the URL for flash-video file. Example for YouTube: s13dLaTIHSg
width
The integer width of the player in pixels. Example: 325
height
The integer height of the player in pixels. Example: 250

Example Usage:

{{video|service=youtube|id=s13dLaTIHSg|width=425|height=344}}
[youtube s13dLaTIHSg 425 344]

Note: If you paste the embed code from a supported service into a text block, it will automatically be converted into the template markup when saved.

Search Text-Template

search

This template will insert a search form that will open a new window with the search criteria supplied. The default search provider is Google, but other search providers can be used by specifying base_url and search_param_name options.

Parameters:

base_url
The base url that the search form will submit to. If specified, the param_name must be specified as well.
search_param_name
The name of the query parameter that will be added to the URL.
size
Optional: The number of characters to show in the field
button_text
Optional: The text to display in the button field, the default is ‘Search’
additional_params
Optional: A url encoded string of paramName=parmValue&paramName2=paramValue2 to be added to the query string. Example ‘lang=en_US&go=true’
provider
Optional: A preconfigured search. If used, all other options except size will be ignored. Allowed values: google, wikipedia, yahoo, youtube

Example Usage:

  • {{search}}
  • {{search|size=50}}
  • {{search|base_url=http://youtube.com/results|search_param_name=search_query}}
  • {{search|base_url=http://youtube.com/results|search_param_name=search_query|additional_params=search_sort=video_date_uploaded&uploaded=d}}
  • {{search|provider=yahoo}}

GoogleMaps Text-Template

googlemap

This template will insert an embedded Google Map. Pasting the Google Map embed-code into a TextBlock will automatically convert the embed-code into template markup.

Parameters:

url
The base url of the map.
s
The security token that Google maps uses for their embeded maps, visible in the embed-source code. (Required)
width
The integer width of the map in pixels. (Optional) Example: 325
height
The integer height of the map in pixels. (Optional) Example: 250

Example Usage:

  • {{googlemap|url=http://maps.google.com/?ie=UTF8&t=h&ll=44.009021,-73.174374&spn=0.011451,0.013046&z=16|s=AARTsJqzARj-Z8VnW5pkPMLMmZbqrJcYpw}}
  • {{googlemap|url=http://maps.google.com/?ie=UTF8&t=h&ll=44.009021,-73.174374&spn=0.011451,0.013046&z=16|s=AARTsJqzARj-Z8VnW5pkPMLMmZbqrJcYpw|width=425|height=350}}

GoogleCalendar

googlecalendar

This template will insert an embedded google calendar. It is easiest to copy paste the embed code from GoogleCalendar rather than manually writing the template markup.

Parameters:

id
The id of a calendar usually an email address sort of thing. You can specify multiple id parameters. Example: gqq3gqfr4jvo79o1b3e2000fh8@group.calendar.google.com
color
The color of a calendar. You can specify multiple color parameters, one for each calendar id. Example: #ff0044
title
The title to display for the embeded calendar (Optional)
width
The integer width of the calendar in pixels. (Optional) Example: 325
height
The integer height of the calendar in pixels. (Optional) Example: 250
mode
The mode of the calendar – WEEK, MONTH, or AGENDA (Optional) Example: MONTH
show_nav
Show or hide the navigation buttons at the top of the calendar – 0 or 1 – default is 1 (Optional)
show_title
Show or hide the title at the top of the calendar – 0 or 1 – default is 1 (Optional)
show_date
Show or hide the date text at the top of the calendar – 0 or 1 – default is 1 (Optional)
show_tabs
Show or hide the tabs to week, month, or agenda views at the top of the calendar – 0 or 1 – default is 1 (Optional)
show_calendars
Show or hide the calendar list at the top of the calendar – 0 or 1 – default is 1 (Optional)
bg_color
Background Color – default is white #ffffff (Optional) Example #a3902d
week_start
Day of the week to start with – 1 (Sunday), 2 (Monday), or 7 (Saturday) default is 1 (Optional) Example: 2
time_zone
The time-zone to use default is empty (Optional) Example: America/New_York

Example Usage:

  • {{googlecalendar|title=My Calendar Title|bg_color=#FFFFFF|week_start=1|time_zone=America/New_York|color=#528800|id=gqq3gqfr4jvo79o1b3e2000fh8@group.calendar.google.com|height=400}}


Comments are closed.