How to display only some of show_record_tabs?

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

Postby Markus » Wed Jul 11, 2007 10:58 am

Hi Steve, hi all,

how can I display only the show_record_tabs I want to e.g. details and list and maybe one related table but not all of the related tables?

If I try it in the ApplicationDelegate.php either with the getPreferences() method or in the conf.ini using [_prefs] I can only hide all or show all of the buttons.

Is there another solution?

Thank you

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

Postby Markus » Wed Jul 11, 2007 11:06 am

Sorry, I didn't mean the show_table_tabs but really the show_record_tabs, which are show and edit and the related tables and NOT list and details.

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

Postby shannah » Wed Jul 11, 2007 12:23 pm

Yes.
You can make it so that a particular relationship doesn't show up by setting the action:condition parameter to 0 or false

e.g.

in relationships.ini:

[my_relationship]
__sql__ = "..."
action:condition=0

That should make it disappear.

For the edit tab and view tab, you can do similar things in the actions.ini file.

If you just want this to happen for a particular table, place an actions.ini file into that table's config folder.

e.g. for table foo, you would add the following to tables/foo/actions.ini

[view > view]
condition=0

[edit > edit]
condition=0

(Note that the view > view syntax means that you are extending the definition of the existing 'view' action with your own view action. If you just did [view] instead of [view > view] it would override the entire view action and wipe out any existing settings).

Hope this helps.

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

Postby Markus » Wed Jul 11, 2007 3:53 pm

Hi Steve,

I tried the action:condition thing in relationships.ini

Maybe interesting for you to know:

action:condition=0 does not work
action:condition=false does not work
action:condition="false" works ;)

Thanks again

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 29 guests

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