Right now there is no perfect solution. This setting's default is hardcoded (this should be changed) inside the Dataface/RecordView.php file.
You can add a global relationships.ini file that can be used to inherit directives from - but it isn't ideal.
It works as follows:
1. Create a relationships.ini file in the root directory or your app.
2. Add a base relationship configuration:
- Code: Select all
[default_rel]
section:limit=10
action:condition="false" ;; Need to hide this relationship.
visibility:find="hidden" ;; Need to hide this relationship from find form.
__sql__ = "select * from dashboard" ;; A dummy query that must be valid
Then in your table's relationships.ini file you could extend this relationship as follows:
- Code: Select all
[my_relationship extends default_rel]
__sql__ = "select .... etc...."
action:condition="true"
visibility:find="visible"
This "extends" functionality was originally developed for, and is most useful in actions but it works for any type of INI file since they all use the same config tool. In this case it isn't helpful because it doesn't have a notion of an "abstract" relationship so we need to expend some directives to hide the base relationship from the find form etc..., then make each relationship that extends it visible. Only if there are lots of directives that you can reuse, is this tremendously helpful.
-Steve