Movable Type Documentation > Movable Type 4.1

Registering Help URLs for Template Tags

Movable Type will automatically link to documentation for a specific template tag, whenever that tag is used by a user within the administrative interface. In order for Movable Type to compose a link properly, it must be given the URL pattern for your help documentation. To do so, register a help_url when you also register your plugin's template tags, like so:

sub init_registry { 
    my $plugin = shift;
    $plugin->registry({
        tags => {
            help_url => 'http://www.somedomain.com/docs/tags/%t.html',
            function => {
                MyTag => '$MyPlugin::_hdlr_mytag',
                # othertag declarations
            },
        },
    });
}

In the above code sample above, Movable Type will replace the token %t with the dirified version of your template tag. For example, the code sample above declares a template tag called MyTag. The help link for that template tag will be:

http://www.somedomain.com/docs/tags/mytag.html
This page was last updated on 2007-11-29, 10:12.  

Submit a User Contributed Note

User contributed notes are a great way to share the knowledge you have gained in using Movable Type.

If you have a technical question or problem, please visit Movable Type Support.

(If you haven't left a note here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)