Page 1 of 1

PostPosted: Wed Jul 11, 2007 10:58 am
by Markus
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

PostPosted: Wed Jul 11, 2007 11:06 am
by Markus
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

PostPosted: Wed Jul 11, 2007 12:23 pm
by shannah
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

PostPosted: Wed Jul 11, 2007 3:53 pm
by Markus
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