The Bridge plugin allows you to alert users when they click a link that will take them away from your site. You may choose from four different ways of informing your users.
Usage Instructions
- Go to Extensions > Plugin Manager
- You are looking for "System - Bridge Page". It is probably easiest if you use the filter to find it. Just type in "Bridge" and hit go, and it should find what you are looking for.
- Click the title of the plugin to begin editing.
- Set Enabled to "yes" if it is not already
- Leave the rest of the information under "Details" as it is. Most of your use of this plugin should be restricted to the "Parameters" Section.
- Under parameters, there are four different ways to use this plugin to inform your users that they are navigating away from your site. Modes 1-3 all perform the same basic function in three diferent but simple ways. Mode 4 on the other hand is a bit more complicated and will likely only be necessary in very special cases. These modes are all described below.
Mode Descriptions
- Mode 1: Javascript Confirmation - This option will present the user with a Javascript pop-up box that will allow the user to accept or cancel the click event. Please note that this mode does not support HTML or automatic redirects.
- To enable this Mode, click the radio button next to where it says: “Show the following text in a javascript confirmation pop-up” then enter your desired display text and click Save
- Once this mode is enabled, and a user clicks a link to an external site, they will see a Javascript pop up that shows the text from the “Display Text” field.
- Mode 2: In the body of the site - This option will present the user with a message in the body of the site, along with a Back and Continue button. You may use HTML or plain text with this option, and you may optionally select to automatically redirect the user after a configured number of seconds.
- To enable this Mode, click the radio button next to where it says: “Show the following text or HTML in the body of the site” then enter your desired display text and click Save
- Once this mode is enabled, and a user clicks a link to an external site, they will be taken to a page that shows the specified display text within your site’s template.
- You can set this page to automatically redirect the user to the destination by setting “Automatically redirect the user?” to “Yes”, and telling it how many seconds to wait before redirecting under “Automatic Redirect Time (in seconds)”
- Mode 3: As a plain HTML page - This option will exit the site template and generate a very simple HTML page with no styling. You may use plain text or HTML with this option, and you may optionally select to automatically redirect the user after a configured number of seconds.
- To enable this Mode, click the radio button next to where it says: “Show the following text or HTML in a blank page” then enter your desired display text and click Save
- Once this mode is enabled, and a user clicks a link to an external site, they will be taken to a plain html page that has the specified display text.
- You can set this page to automatically redirect the user to the destination by setting “Automatically redirect the user?” to “Yes”, and telling it how many seconds to wait before redirecting under “Automatic Redirect Time (in seconds)”
- Unlike Mode 2, this mode does not provide Continue and Back buttons, so in order for the user to reach the destination url, you need to either provide the destination url (using the {url} variable described below) or set it to automatically redirect after the appropriate number of seconds.
- Mode 4: Redirect to another page - This option will allow you to override the link destination and redirect to another page--a content item, for example. This method is a bit more complicated, and in most cases won’t be necessary.
- To enable this Mode, first you’ll need to create a custom content item that you’ll want to act as your bridge page:
- Go to content > article manager > New
- You’ll want to give your custom page a title, like “Leaving [your site name]”, or something to that effect. Leave it as “Uncategorized”
- You’ll want to enter whatever content that you’d like people to see in the content window. This page should explain to the user that they are leaving your site, and most likely it should include the special variable, {bridgepage_url} as described below. This variable will pull the destination url of the outgoing link, so that you can allow people to click to the destination from the bridge page.
- Now that you’ve created the custom content for your redirect page, you can click save in the upper right hand corner
- Next we’ll need to create a menu item to get to the content page in the front end. However, we are not going to publish the menu item because we don’t want it to appear in any menus.
So you’ll want to go to Menus > Main Menu > New > Articles > Article Layout which will take you to the menu item editor page. - In the menu editor, you’ll need to give your menu item a title, something like “Bridge Page” would work.
- You’ll also need to tell the menu item to point to your custom content item, using the “Select Article” tool, click the “select” button.
- This will pop up the article selector box, find your article and click it’s title to select it.
- You’ll also need to set the “Published” Field to “No”, because we won’t actually need a public menu item to this content page.
- Now that you’ve given your menu item a title, selected your content item, and made sure it was unpublished, please click the “Apply” button.
- Because you clicked the apply button, it should save this menu item, but keep you in the menu editor. Now that your menu item has been saved, there will be a link in the “link” field.
- Please copy the url found in that field. It should look something like this:
index.php?option=com_content&view=article&id=19 - This is the URL of your custom bridge page. You’ll want to save this URL because you’ll need it later. Now you can hit close in the upper right of the menu editor.
- To enable this Mode, first you’ll need to create a custom content item that you’ll want to act as your bridge page:
- Now that you have the URL for the custom bridge page, you’ll need to navigate to the Bridge Plugin page (Described above under Usage Instructions).
- Click the radio button next to where it says: “Redirect to another page”.
- Paste the custom bridge page URL from step 12 into the field marked “Redirect URL”.
- Click Save in the upper right.
Exemptions:
In this field, please enter the URL’s of any domains you’d like to be exempt from this plugin. So, for example, if you knew that whenever you linked to google, you’d want your users to skip this bridge step, then you would add www.google.com into the exemptions list.
Special Variables:
There are two special variables that this plugin uses:
- {url} - Use this variable in the plugin configuration to render the destination url as a link within the body of the alert message. You can place this in the “Display Text” fields in the parameters, and it will display the destination url in the alert.
Example:- Paste variable into the display text as shown:
- Should display on front end alert accordingly:
- Paste variable into the display text as shown:
- {bridgepage_url} - Use this variable anywhere else on the site (content items, templates, etc) to have it replaced with the destination url. This is mostly only useful when used in combination with Mode 4.
Example:- Paste variable into your Mode 4 custom bridge page
- Should display on front end accordingly:
- Paste variable into your Mode 4 custom bridge page
NOTE: Setting up the Bridge plugin will not affect whether a link opens in the current window or a new window. To have an external link open in a new window, you will need to set the target of the link to "Open in a new window"