|

Actions are plug-in files that work hand in hand with Freeway to do some pretty amazing things. Place an action in the Freeway Actions folder and all of a sudden you can do things with Freeway that you either couldn't before or that were just too tricky!
So what can actions do? Well they can automate a lot of the day to day work that can turn a simple site into a nightmare to keep up to date. Alternatively they can integrate with the code that Freeway produces to create quite complex creations like DHTML menus or shopping carts.
An example
Let's look at a really simple example of an action at work. When maintaining a large site you may want to keep track of who updated what pages and when. Actions are ideally suited to this and can automatically track changes made to the HTML pages.
Let's take a look at the action itself;
<page-action name="Last Modified Date & Time Comment">
<action-text name="User">
<action-html after-start-html><!-- Last modified by &User; on &_date; at &_time;. -->
</action-html>
</page-action>
So what does this actually do? Well if we take this code and pop it into a text file and save it in the Freeway Actions folder we can apply this action to any of the pages we create inside Freeway. Now when the user enters their name in the "User" field and publishes the site the action automatically places the following comment in the HTML output;
<!-- Last modified by Tim on 10/3/10 at 6:10:08 pm. -->
Can you see that the action has merged the user's name, date and time together in the comment? Not only that but every time the page is published the action will undertake the same task each and every time. If you think of actions as your little helpers that tirelessly help you out with site creation and maintenance then you're just scratching the surface of what can be done!
|