Skip to main content
MindTouch Success Center

Best Practice: How Juniper adds Recommended Links to Pages (MT4)

Written by Amanda Cross
Content Strategist at Crosswise Consulting
This page applies to:All MindTouch Versions

This document describes how Juniper Networks used the EditableLinkList template in the right side tray on MindTouch to create a customizable list of recommended and related articles on each page.

How it works

The default Related Pages functionality in MindTouch 4 automatically generates a list of related pages. An author can influence the list of related pages by adding custom tags to the article, but an author cannot control the related pages list. Juniper wanted authors to have the ability to craft a list of related links without having to artificially manipulate tags. Juniper also wanted the flexibility to include links to articles outside of its MindTouch implementation. 

To achieve these goals, Juniper Networks used the EditableLinkList template in the MindTouch side tray. The EditableLinkList template provides an interface to create links in a flexible widget.  

End user experience

When users view any page in the TechWiki (the name of Juniper's MindTouch site), they see a list of Recommended Links in the right side tray. Users can click these links to go directly to helpful related articles chosen by the author.


Author experience

When authors view the page, they see a list of Recommended Links in the right side tray. They can choose to delete existing links by clicking the red X. Authors can click +Add link to display a window where they can create a link to appear in the list.


The window that appears when you click +Add link has tabs that let you create your link in different ways. You can:

  • Navigate to the MindTouch page you want
  • Search for the MindTouch page that you want
  • Add a link to a resource outside of MindTouch


Behind the scenes

To make this work, Juniper added the following DekiScript to the Side Tray template:

var permissions = wiki.pagepermissions(); 
var userEdit = permissions.update ?? false; 
template('MindTouch/Controls/EditableLinkList', { 
     tabs: 'tree|search|external', 
     userEdit: userEdit 

This code checks to make sure the user has permission to update the page before calling the EditableLinkList template. The EditableLinkList template is delivered with MindTouch and does not require any customization for this solution.

The window tabs are customizable through this code as well. For example, if you did not want your authors to link to resources outside of MindTouch, you could remove |external from the code and prevent the Web Link tab from appearing in the window. 

Juniper also typed the words "Recommended Links" into the Side Tray template above the DekiScript and made them an H2 in order to create the heading you see above the list of links. 

  • Was this article helpful?