Body Tag

This is a required tag that generates the Missing Link menu markup and various <script> tags. It should be placed within your site’s <body> and there should never be more than one copy of the tag per page. If you would like to generate multiple menus per page, see the menu tag.

Parameters

entry_id

On permalink-style pages you can pass the relevant entry ID to Missing Link and various entry-specific links will be added to the menu. These include ‘Edit This Entry’, ‘Manage This Entry’s Comments’ and so on. Here’s a basic example of how to use the body tag with the entry_id parameter:

{exp:channel:entries channel="news" limit="1"}
    
<h1>{title}</h1>
    
{body}
    {exp
:missing_link:body entry_id="{entry_id}"}
{
/exp:channel:entries} 

Missing Link will automatically detect whether the entry ID you have provided is valid. This means you can place the body tag in an embedded header/footer template and safely use the following syntax, even if you know that sometimes the parent template will not be providing an entry ID.

In the following examples both of the primary template code snippets will work and a Missing Link menu will be generated, but only the first of the two will include entry-specific controls.

<!-- Primary templatewithin channel:entries tags -->
{embed="my/footer" entry_id="{entry_id}"}

<!-- Primary templateon a page that is not entry specific -->
{embed="my/footer"}

<!-- Footer template -->
{exp:missing_link:body entry_id="{embed:entry_id}"

template

Adding a template parameter to your body tag will customise your Missing Link menu so that the generic ‘Edit Templates’ link is replaced with an ‘Edit This Template’ link . This should always be in the format group_name/template_name. For example:

{exp:missing_link:body entry_id="{entry_id}" template="site/comments"