Additionally EasySEO add-on supplies macro {seo-link} and {seo-link-with-body} to create links to other pages automatically enhanced with SEO attributes.

When linking to a Confluence page or blogpost this macro automatically uses excerpt as the HTML A title attribute. This macro supports all attributes of the HTML <A> tag. Please see macro help for all parameters.

{seo-link:Another page|body=link to another page|id=seoLink|class=seoLinkClass|style=text-decoration:none}

{seo-link-with-body:Another page|id=seoLink|class=seoLinkClass|style=text-decoration:none}
link to another page
{seo-link-with-body}

both will result in:

<a href="/display/TEST/Another+page"
 title="This is the excerpt from the Another page..."
 style="text-decoration:none"
 class="seoLinkClass"
 id="seoLink">
link to another page</a>

It is recommended to use "with-body" variant when the link text is complex, contains HTML or other macros

If you want to suppress title tags for links to pages that do not have the {excerpt} macro, use parameter "noautoexcerpt=1".

If you want to use the new method of summarizing the page when producing excerpts automatically for pages that do not have the {excerpt} macro, use parameter "useNewExcerptMethod=1".

In Velocity templates one can use the following call:

## The last 6 arguments correspond to HTML <A> tag attributes and can be set to null
## $href is only taken into account if $page is not specified
$seoHelper.renderSeoLink($body, $spacekey, $page, $sourcePageId,
 $href, $title, $style, $id, $cssClass, $onclick)
## if the value for the title attribute is not set explicitly it is automatically built 
## using the same methods as used fro the meta description value, but only if $page is specified
## if you want to suppress building of titles when {excerpt} is NOT present on the $page page
## specify "false" in the 11th argument
## if you want to use the new excerpt method use "true" in the 12th argument
$seoHelper.renderSeoLink($body, $spacekey, $page, $sourcePageId,
 $href, $title, $style, $id, $cssClass, $onclick, true, true)



Other documents

Purchase from the Atlassian Marketplace

TechTime EasySEO

Purchase