Disabling single feature of show_actions_menu

A place for users and developers of the Xataface to discuss and receive support.

Postby Markus » Tue May 15, 2007 8:32 am

Hi all,

another question i have and could not find an answer yet is if it's possible to disable a single feature (let's say find) in the show_actions_menu or only the whole show_actions_menu?

I would like to create a custom find form for my users. Can I maybe integrate this behind the find tab as an alternative?

greets

Markus
Markus
 
Posts: 94
Joined: Wed Dec 31, 1969 5:00 pm

Postby shannah » Tue May 15, 2007 12:07 pm

There are actually a few ways to disable or replace an action from the table tabs.Ê These tabs are all actions defined in the actions.ini file.Ê Check out the actions.ini file in the dataface install directory to see all the available actions.Ê If you go there and search for [find], you'll see this:

;; Show a "Find Record Form"
[find]
label = Find
category = table_tabs
url = "{$this->url('-action=find')}"
accessKey = "f"
mode = find
permission = find
template = Dataface_Find_View.html
order=0.75


Or something like it.Ê The category=table_tabs is what causes it to show up in the top tabs.Ê If you wanted to make your own action and make it show up in the table tabs you could add an actions.ini file to your application directory and set category = table_tabs.

You could even override the existing find action by copying and pasting its section into your app's actions.ini file and changing the values youÊ want to change.Ê For example you could simply change the template to the name of your own template to change the find form.

In Dataface 0.7 you could actually just create an action called find and only override the values that you want changed using the syntax:

[find > find]
template=MyTemplate.html

(This means that your find action inherits from the default find action... without this, it would just replace the whole action).

Another way to override the find form is to not worry about the actions.ini file at all, but instead override the find_form slot using the application delegate class.

e.g. function block__find_form(){
ÊÊÊ echo "My find form content ....";
}

Hope this helps a little.

-Steve

--
Steve Hannah
@shannah78 (on twitter)
sjhannah.com blog
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Postby Markus » Wed May 16, 2007 3:00 am

Hello Steve,

really good instructions which make me understand your wonderful tool a little better. I just upgraded to 0.71 and found all the stuff in german language. Perfect.

I will give you a little more feedback on your last posting, when I am ready with my changes.

Thanks a lot for this

Markus
Markus
 
Posts: 94
Joined: Wed Dec 31, 1969 5:00 pm


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 27 guests

cron
Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved