Class MarkerTemplate : getOptionValue Method


Boolean, String or Int getOptionValue( String optionName )

Summary

Returns one of the template options.


Remarks

Options are decided by the template, complete with default, minimum and maximum values.

The user can change these on the marker type defaults.

When an option value is returned it contains either the value chosen by the user or the value set as default by the template.

If the user has never changed a value then the default is returned instead.


Parameters

ParameterDescription
String optionName The name as specified in the marker template script.


Returns


The option value


Examples

Code below is from the Video Marker.

It uses two options. One to see whether to perform conflict checking and one to determine how many conflicts to allow.

template.onVideo = function( menu, marker, programme )
{
if( !marker )
{
var nMax = this.getOptionValue( "Maximum Conflicts" );
var bConflicts = this.getOptionValue( "Check for conflicts" );
if( !bConflicts || CheckForConflictsWithType( programme, this.id, "Video", nMax ) )
{
var marker = new Marker( this.id );

marker.programmeName = programme.name;
marker.markerName = "Video: " + programme.name;
marker.anchorDate = programme.startDate;
marker.clearChannels();
marker.addChannel( programme.channel.id );
app.getMarkerManager().addNewMarker( marker, true );
}
}
else
{
app.getMarkerManager().removeMarker( marker, true );
}
}


See Also

  • MarkerTemplate : addOption


    Requirements

    Build 1059