From: Lacey-Anne S. <Lac...@sh...> - 2011-09-26 23:01:54
|
Hi Meg, I've added in the relationships to connect all the tripal content to the nodes. Due to the way Drupal content (nodes) are connected to Chado content through a chado_x table this is a two part relationship. I also added a tutorial on how to do this: http://tripal.sourceforge.net/?q=node/33. Short summary of instructions: In your case, you'll go into your organism view and add, first, the "Organism: Organism => Chado" Relationship and then the "Organism: Chado => Node" relationship (making sure to set this relationships, relationship to the first one). Then when you click the + beside fields you should see the Content group which is where your CCK field will be. One problem I ran into is that views breaks if your CCK field machine name is too long so make sure yours are short (http://drupal.org/node/571548). Hope this helps! ~Lacey ------------------------------------------------------ Lacey-Anne Sanderson Bioinformaticist Pulse Crop Breeding and Genetics Phone: (306) 966-2430 Email: lac...@sh... Room 3D10 Agriculture Department of Plant Sciences University of Saskatchewan On 2011-09-23, at 1:57 PM, Lacey-Anne Sanderson wrote: > Hi Meg, > > I actually just ran into this problem myself. This is a problem with my implementation of views integration. > > If you add fields from one base table (node) to another (organism) using implicit relationships like I did you get the fields for the node in organism but in order to get all fields attached to nodes through relationships (CCK) you need to add the node to the organism using an explicit relationship (In the views interface click add Relationship). > > Unfortunately I don't have explicit relationships coded up yet though I'm working on it as we speak. Hopefully by the end of next week I'll have this working for you ( I have it working on my devel site for features) :) > > ~Lacey > > ------------------------------------------------------ > Lacey-Anne Sanderson > Bioinformaticist > Pulse Crop Breeding and Genetics > Phone: (306) 966-2430 > Email: lac...@sh... > Room 3D10 Agriculture > Department of Plant Sciences > University of Saskatchewan > > On 2011-09-23, at 1:39 PM, Meg Staton wrote: > >> Lacey, the Drupal 7 code sounds amazing. I'm impressed with how much it sounds like you accomplished! >> >> I'm still a bit confused about integrating chado with views and CCK, so here's my problem. I have tripal organisms, and I added a CCK check box field to the organism content type. Then I go to the Views module, and I want to create a view of just the organisms with a positive value in that check box. If I choose a Node view type, I can see my checkbox in the Content group and use it, but I can't see the organisms values added by drupal - genus, species, etc. If I choose an Organism view type, I can see all the chado goodness, but not the values added by CCK (the entire content group is missing when you try to add fields). >> >> Now, I could probably do this with custom php fields without too much trouble, but I think that it would be good for the code to enable users to have cck fields on top of tripal modules and also be able to utilize them in views without coding. >> >> So my questions: >> 1. Have I fundamentally misunderstood how views is supposed to work? Or was this a design decision that was already thought through? >> 2. Do you have any idea how the content group be made available to a chado view type in views? I could use a nudge in the right direction from those of you who have messed with CCK and Views development before. I see where tripal_organism is joined to the node table in retrieve_chado_organism_views_data, but I'm not sure how to go from there to the cck fields... cck creates a custom table called content_type_chado_organism, but its columns are dynamic... and finally, the cck module has views plugins and handlers that should be used. Not sure how to mush all this together to make sense yet, but I plan to keep trying. >> >> It sounds like this might all work together better in Drupal 7. >> >> Thanks, >> Meg >> >> -- >> Margaret E. Staton, PhD >> Clemson University Genomics Institute >> me...@ya... >> 864-656-4643 >> From: Lacey-Anne Sanderson <lac...@sh...> >> To: gmod tripal devel <gmo...@li...> >> Sent: Wednesday, August 31, 2011 6:21 PM >> Subject: [Gmod-tripal-devel] Drupal 7 Development >> >> I've been experimenting with Drupal 7 the last couple of weeks and come up with an initial Tripal 7.x version. This version is in svn under branches if you want to see the code or continue development. For additional information on this first attempt at converting Tripal to the 7.x branch see this article: http://tripal.sourceforge.net/?q=node/32. >> >> Summary: >> Implemented a chado entity (basic data type in Drupal -on the same level as nodes, comments, blocks, etc.) which provides a few fields common to all Tripal content, handles form,insertion,updating and deleting of these fields and provides a framework for chado content types (organism currently defined) to register themselves as chado content types and insert/update/delete chado content. The chado entity handles joining of Drupal content with chado content and stores this linking in a single table (chado_content) rather then the many tables (node, node_revision, etc, chado_organism, chado_feature, etc.) used in Tripal 6.x. Also implements the Field UI allowing fields to be attached to chado content types through the web-interface although the field UI was not used for the chado content due to complications. >> >> Implemented an administrative interface: >> - Manage Biological Content: a page similar to Manage Content in Drupal 6 except specific to chado content. This page is accessed from the base level of the administrative menu making managing chado content easier for Tripal Administrators. >> - Manage Chado Structure: lists all chado types providing links for managing fields (adding additional Drupal-stored fields to any chado content types through the web-interface) and even adding new chado content types (doesn't yet allow web-interface created chado types to connect to chado content but isa big ToDo for the future). >> >> These modules were created simply to test out how Drupal 7.x functionality could be used for Tripal. Our last discussion had ended with -we don't yet know enough about Drupal 7 functionality to decide which parts to adopt and which not to... I'm hoping this attempt will help educate us on what is possible with Drupal 7. Anyone else who wishes to explore Drupal 7 and what it can do for Tripal is welcome to use this initial release as a lauchpad. The other area that needs to be explored in depth (not done in this initial release) is using Fields for Chado content... I made an attempt on this (see tripal_organism/tripal_organism.field.inc) but came across a number of problems which I'll post to the list in another email. >> >> ~Lacey >> >> ------------------------------------------------------ >> Lacey-Anne Sanderson >> Bioinformaticist >> Pulse Crop Breeding and Genetics >> Phone: (306) 966-2430 >> Email: lac...@sh... >> Room 3D10 Agriculture >> Department of Plant Sciences >> University of Saskatchewan >> >> >> ------------------------------------------------------------------------------ >> Special Offer -- Download ArcSight Logger for FREE! >> Finally, a world-class log management solution at an even better >> price-free! And you'll get a free "Love Thy Logs" t-shirt when you >> download Logger. Secure your free ArcSight Logger TODAY! >> http://p.sf.net/sfu/arcsisghtdev2dev >> _______________________________________________ >> Gmod-tripal-devel mailing list >> Gmo...@li... >> https://lists.sourceforge.net/lists/listinfo/gmod-tripal-devel >> >> > |