Want to convert links in your theme navigation menu to do powerful things like switching languages, printing the current page or viewing a shopping cart? How about the idea of having links on a webpage force a linked image or video to download? Or the added convenience of giving website visitors a simple button to reload the current page? All these things and many, many more are feasible with the ActionHost stack. This powerful stack modifies simple links and anchors; making them do things you never thought were previously possible! ActionHost is an essential stack for the discerning RapidWeaver user who wants to do more with a page navigation menu or ordinary links. All for not much more than the cost of a coffee.

What makes ActionHost particularly revolutionary is that it doesn't force you into writing seriously complicated Javascript code or trying to manipulate links with awkward URLs. Simply tell ActionHost what link or links to look for, select an 'action' from a pull-down menu and configure the action properties. Within a couple of seconds, you can radically change the behaviour of any conventional links within the webpage.

Please note that ActionHost requires a minimum of Stacks 3.5. ActionHost will not show or work in older versions of Stacks.

Examples

Here are a couple of very basic examples, showing the ActionHost stack in use. Please download the free demo version to explore the full set of actions available.

Navigate to previous page (assumes you came to this page from another page)
 

Setup

Follow these instructions carefully for setting up a single ActionHost stack...
  1. Once installed into Stacks and RapidWeaver, open the Stacks Library and search for 'action host'
  2. Drag and drop a copy of the stack into your webpage
  3. Select the stack in edit mode, to access the Stacks side panel (settings)
  4. Customise the Trigger Type (use either text or a URL) and adjust the Trigger Condition and Trigger Value accordingly
  5. Within the Action Properties, choose an action type and configure its settings
  6. Preview your webpage and check to see that the action is working, when the link is clicked

You can safely use multiple ActionHost stacks on the same webpage; and even use multiple ActionHost stacks to apply actions on the same link. However care should be taken that actions don't conflict with one another. For example, avoid disabling a link; while at the same time trying to force a download! It simply won't work.

ActionHost works best on links that are available as the page loads. It is less suitable for manipulating links that are dynamically added to the page later on.

One or more ActionHost stacks can be grouped together inside a 1-column stack and hidden. ActionHost stacks can also be packaged as partials, for quick reuse on other webpages.

The Execute Custom jQuery action type lets you write your own custom jQuery Javascript code, applied to the link. The normal href link will be disabled. This code is nested within an 'onClick()' event and will fire, once the button is clicked or tapped. It can be useful for applying advanced modifications to links. The sample jQuery code shown in the stack settings will simply fade the page from view, when a matching link is clicked. If you need to apply jQuery Javascript before the button is clicked (like extra attributes) then the free Builder stack is best to use for this purpose.