-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expanding Tripal 4 Fields documentation #32
Comments
Note: You can get the mapping of terms to chado columns in your site by navigating to http://localhost:9000/admin/tripal/storage/chado/terms or Admin > Tripal > Data Storage > Chado > Chado Term Mapping This is good for looking up terms you want to use in your field when referring to specific columns. You can also look this up programatically but I can't remember the code off the top of my head. @spficklin can you add that here? |
Just in case, here is query to list all cvterms, their cv name, and accession SELECT cv.name, dbx.accession, cvt.name
FROM cvterm cvt, cv, dbxref dbx
WHERE cvt.cv_id = cv.cv_id and cvt.dbxref_id = dbx.dbxref_id ; example output:
|
Extend the example defaultFieldSettings() to include a CV term to show how that is done for a field that has a constant term, e.g.
oops, to match the example style, it should be
|
Formatter Token Strings (After PR tripal/tripal#1697 )For fields that may want to present more than one column from a table, you can easily implement a token string in the formatter settings. A form element and validation can be provided automatically just by including a
You would then implement code in your formatter similar to this
|
Content types currently present by default in Tripal 4
Tables with more than one content type
|
Matrix of all potential links between content types.
*These linker tables have additional columns.
§Foreign key names are different than the object table primary key.
|
This issue is a place for everyone working on fields to drop tips, tricks and bits of documentation that we can later incorporate into the official docs at https://tripaldoc.readthedocs.io/en/latest/.
The text was updated successfully, but these errors were encountered: