Twitter Feed

Xataface Maillist

Sign up to receive the Xataface news letter with weekly updates and development tips.

Previous: Actions I: The Basics Up to Contents Next: This is a test

Getting Started with Xataface


Web Lite is a simple framework for developing data-driven web applications in PHP and MySQL. This tutorial will show you how to get a dataface powered web application running in under 20 minutes.

Actions II: Intermediate

Use permissions, categories, and other parameters from the actions.ini file to improve your action's integration into the application.

In the previous section we introduced actions and action controllers as a means of adding custom pages to your Xataface application.  In this section we will deal with some fine-tuning issues such as:

  • Restricting who can use and see your action using permissions.
  • Making your action appear in the correct menu using the category attribute.
  • Applying rules to define when your action is visible in its menu.
  • Using the ActionTool class to work with your actions programmatically.

actions.ini file options:

There are quite a few options that you can set for your actions in the actions.ini file:
The name that will appear in the interface for your action if it is bound to a button, link, menu-item, or tab.
A descriptive sentence about your action (may appear in a roll-over in the interface for your action)
The name of the permission that is required to be able to see and perform your action.  e.g. permission=edit
A PHP expression that evaluates to a boolean to define whether your action should be visible in a given context.  e.g. condition = "$query['-mode']=='browse'"
When your action is listed in a menu or as a link, this is the url that it should point to.  e.g.: url = "{$this->url('-action=delete&-delete-one=1')}"
The URL to an icon that can be used for your action.  e.g.: icon = "${dataface_url}/images/document_icon.gif"
You can group your actions together by assigning them to the same category.

More to come...

Previous: Actions I: The Basics Up to Contents Next: This is a test
blog comments powered by Disqus
Powered by Xataface
(c) 2005-2021 All rights reserved