Help - Text-Templates
 
About Text-Templates
 

Text-templates are simple systems for creating dynamic text similar to MediaWiki templates. Access to text-templates is done by adding the following markup to text:

{{template_name}}

Additionally, optional named parameters can also be passed to text-templates:

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

Text-templates 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 text-templates that come with Segue. See the Documentation page on text-templates for information on creating your own text-templates.

Video Text-Template
 
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}}

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 Text-Template
 
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}}
Pop-Up Window Text-Template
 
popup
 

This template will open a link in a popup window.

Parameters:
 
url
The url to link to. (Required)
text
The text to display in the link. (Required)
window_name
A name for the new window. If given, multiple links can open in the same popup window rather than spawning new windows. Must be letters, numbers, or underscores. (Optional) Example: help_window
width
The integer width of the popup window in pixels. (Optional) Example: 325
height
The integer height of the popup window in pixels. (Optional) Example: 250
resizable
If yes, the popup window will be resizable. 'yes' or 'no' - default is 'yes' (Optional)
location
If yes, the popup window will have the location bar. 'yes' or 'no' - default is 'no' (Optional)
scrollbars
If yes, the popup window will have scrollbars if needed. 'yes' or 'no' - default is 'yes' (Optional)
status
If yes, the popup window will have a status bar displayed at the bottom of the window. 'yes' or 'no' - default is 'yes' (Optional)
menubar
If yes, the popup window will have the menu bar with file, edit, menus. 'yes' or 'no' - default is 'no' (Optional)
toolbar
If yes, the popup window will have the tool bar with back/forward/refresh buttons. 'yes' or 'no' - default is 'no' (Optional)
top
The integer position of the popup window in pixels from the top of the screen. (Optional) Example: 25
left
The integer position of the popup window in pixels from the left side of the screen. (Optional) Example: 250
Example Usage:
 
  • {{popup|url=http://slashdot.org|text=Slashdot|resizable=no|location=yes|menubar=yes|scrollbars=yes|status=no|toolbar=no|fullscreen=no|dependent=no|width=300|height=600}}