Skip to content

<xmod:MetaTags>

<xmod:MetaTags> modifies the host page's metadata at render time — <title>, <meta name="description">, <meta name="keywords">, and <meta name="robots">. Each child tag (<Title>, <Description>, <Keywords>, <Robots>) either replaces the existing value or, when Append="True", appends to it.

This is most useful on detail views, where you can plug record-specific text into the page title and description for SEO and shareability.

For meta tags to take effect

The page must already have the <meta> tag in place (DNN typically adds them based on Site Settings → Description / Keywords). <xmod:MetaTags> finds the existing tag by ID (MetaKeywords, MetaDescription, MetaRobots) and updates its content. If your skin or DNN version doesn't render the meta tag, the corresponding <xmod:MetaTags> child has no effect.

Example

html
<xmod:Template Id="Employees">
  <DetailDataSource CommandText="SELECT * FROM Employees WHERE EmployeeId = @EmpID">
    <Parameter Name="EmployeeId" Value="[[Url:eid]]" DataType="Int32" />
  </DetailDataSource>

  <DetailTemplate>
    <h1>Employee Profile</h1>
    <h3>[[FirstName]] [[LastName]]</h3>
    <h4>Biography</h4>
    <div>[[Bio]]</div>

    <xmod:MetaTags>
      <Title>Employee Profile for [[FirstName]] [[LastName]]</Title>
      <Keywords Append="True">[[FirstName]],[[LastName]]</Keywords>
    </xmod:MetaTags>
  </DetailTemplate>
</xmod:Template>

Child Tags

<xmod:MetaTags> has no attributes of its own — it's a container for child tags that target specific page metadata.

TagTargetsDescription
<Title><title> elementPage title
<Description><meta name="description">Description for search engines and social previews
<Keywords><meta name="keywords">Keywords for search engines
<Robots><meta name="robots">Robots directive (index, noindex, follow, nofollow, etc.) (since v4.8)
<Redirect><meta http-equiv="refresh">Inserts a meta-refresh redirect (since v4.3)

<Title> / <Description> / <Keywords> / <Robots>

Place the new metadata text between the opening and closing tags. Field tokens are evaluated at render time.

AttributeValuesDefaultDescription
AppendTrue FalseFalseWhen True, the tag's content is appended to the existing page metadata instead of replacing it

For Keywords, Append="True" adds a comma between the existing keywords and the appended ones if needed.

<Redirect>

Inserts a <meta http-equiv="refresh"> tag, redirecting the browser to another URL after an optional delay.

AttributeValuesDefaultDescription
UrlURLDestination URL
Delayinteger (seconds)0Seconds to wait before redirecting. 0 redirects immediately