Welcome

BoltWire is a content management system developed by Dan Vis.

Welcome Tour
Documentation
Mailing List



Popular Posts

Version 5.11 Released
May 26, 2016

Big Changes Coming Soon...
April 28, 2016

Catching Up
April 6, 2016



Other Sites

Here's some other sites by Dan Vis:

Alexa Echoes
Join my adventures developing for Amazons exciting new voice platform.

Firefly Spot
Personal rambling about new gadgets, technology news, and space travel.

FAST Missions
My ministry hub, with news and updates about our online school.

You can follow him at www.danvis.info.

Actions

Documentation > Concepts > Actions

The secret behind BoltWire's small size, yet dramatic power, is its action pages. Essentially, all site actions are constructed from site pages -- making it easy to add, modify, or delete actions at will--just like any other page. Here are the actions available in the default installation of BoltWire

action.blocked
action.help
action.login
action.logout
action.register
action.search
action.source
action.title

Understanding Actions

Suppose you wanted to create a new site action, say a "greeting" action, that simply gnerated a blank page with a brief message on it. All you have to do, is create a new page named action.greeting. The page content can be simple text, a function, a complex form, or anything else you can put in a page. In our example, we might want to put content like the following on the page:


Hello {member}

This will display the word "Hello" followed by their member name.

To call your new action, you simply add &action=greeting to the end of a link or in your browser address bar, directly (you can also go to the action.greeting page). For example, suppose you put this link in a page:


[[some.page&action=greeting|Get Greeting]]

When you click the link, the action is "layered" over the specified page (some.page). That means some.page is still considered the current page for all page variables, data variables, etc. Only the content of the action page is displayed instead.

To illustrate this, suppose you modified your greeting action page to include the following line:


Hello {member}
You are currently on page {p}

If you were to call this action from this page, you would see the greeting action, but {p} would be replaced by docs.concepts.actions, rather than action.greeting. That is, this page would remain the base page, but the greeting action would be displayed over it.

Of course, you can create much more interesting actions using BoltWire's many commands, functions, and conditionals on action pages. To get an idea of some of the things you can do, explore the various actions currently installed in your site. BoltWire comes with nearly 30.

In fact, everything your site does is controlled by one action or another. This is why you can modify how BoltWire does anything. You can delete, rename, edit or customize any action by simply editing the corresponding action page. Everything is at your finger tips. Basically, you build your entire site -- from right within your site.

Note: if you call an action that does not exist, BoltWire will display a blank page.

Hierarchical Actions

BoltWire can also override actions, for local groups of pages, hierarchically. Suppose you wanted to have a different greeting occur if a visitor were on a page in one specific group of pages -- say a members page. Just create an action called action.members.greeting. Then when a person clicks members.test&action=greeting, BoltWire will use action.members.greeting rather than action.greeting. The latter, of course, will be used in other sections of the site.

This is especially useful with certain actions that occur automatically. This makes it possible for you to customize how missing or blocked pages work for any section of your site (action.missing and action.blocked). Or even for specific pages. Simply create a page called action.members.missing, or even action.members.test.missing.

For more information about how to control who can use which actions, please read the tutorials on member management and security.

Learning More

To learn more about what you can do with action pages, study the various examples that come with BoltWire. Go to page site.action for a list of all the actions currently installed on your system. To create a custom action page, consider using one of the default actions as a model. Copy the markup to a new action page first and then customizing it as desired. Be careful to not modify default actions unless you know what you are doing.

Also, remember that forms do not need to be in action pages. They can be put anywhere in your site (by authorized editors). Action pages just make some extra effects possible. For more information about forms, read the forms tutorial.

To leave a comment, please login using your Facebook account: