Not a developer? Go to MovableType.com

Documentation

Template Tag Handler

The remainder of the Plugin.pm file above defines the meat of your plugin. Let’s look at it more closely:

sub tag {
    my ($ctx, $args) = @_;
    my $cfg = $ctx->{config};
    return $cfg->MyImageURL;    
}

Movable Type passes into every tag handler the current Movable Type “context.” The context contains critical information about the system, including information about the current user, the current request, and the system’s configuration. We will use the context to retrieve the value of the MyImageURL configuration directive we declared earlier.

Now that the template tag has been defined you can now use the following tag in your templates to output the value associated with the MyImageURL configuration directive:

<mt:MyImageURL>

We are almost done. If we stop there, you will never succeed in your Jedi training. As Yoda famously said:

“For once you stop documenting your code, forever will you be doomed to forget its function. Relegate your users to confusion you will.”

I am pretty sure he said that. You can look it up.

Back