|
From: Scott C. <sc...@sc...> - 2013-10-14 18:30:14
|
Hi Stephen, Actually, I don't think it needs to be an iframe--that's just the way I think sometimes. An image generated by gbrowse_img would be fine, though in addition to what you have in rosaceae, I'd think it would make sense for the image to be a link to the same display in GBrowse (probably opening in a separate window, but those are details). Also, I want to make sure I understand: you're saying there are two ways I could do it, either by using CCK or by creating a subtemplate, right, I don't do both? Which is easier and/or more maintainable? Thanks, Scott On Mon, Oct 14, 2013 at 12:00 PM, Stephen Ficklin <spf...@gm...>wrote: > Hi Scott, > > Would you like for GBrowse or JBrowse to automatically show the feature > and all alignments, something like this page: > > http://www.rosaceae.org/prunus/prunus_persica/ppa000475m?block=alignments > > But, rather than just an image, you would like the application visible in > an iFrame with the feature automatically in view? > > I believe you may be able to do this with minimal coding using CCK > elements. Tripal already uses CCK elements to allow for easy addition of > new items to the Resources right-sidebar. Instructions for doing this are > on the Tripal v1.1 tutorial: > http://www.gmod.org/wiki/Tripal_Tutorial_v1.1#Adding_New_Resources_To_Pages. > Unfortunately, I have never tried to add a bit of PHP code to the CCK > field, which is what you'd need to do to be able to generate a URL for the > iFrame for the specific feature shown on the page. I think it can be done > and if you'd like to go this route I can try to help figure out how to do > it. > > Second, you can do this by creating a custom template file. There are > instructions on the Tripal Developer's Handbook ( > http://www.gmod.org/wiki/Tripal_Developer's_Handbook) for how to add new > template files and using the Tripal API to get data. In short, here is > what you'd do: > > 1) Copy all of the templates from the Tripal theme into your default > theme directory. This way, when Tripal is updated your custom templates > won't be overwritten > 2) In the tripal_theme/tripal_feature directory, add a new subtemplate > file for your iframe content. > 3) Add an 'include' statement in the node-chado_feature.tpl.php file to > include your new subtemplate file > 4) Add code to your subtepmlate file for creating the iFrame with the > proper URL for displaying the feature. > > Once you get used to how the templates work, it is very easy to add new > templates, and the Tripal API makes it relatively easy to get data. You > shouldn't have to do any SQL queries at all in the template files. I can > provide more specific details depending on how you want to go with this. > > Hope this helps, > Stephen > > > > On 10/11/2013 12:46 PM, Scott Cain wrote: > > Hi Stephen and all, > > I'm looking a way to put GBrowse and JBrowse iframes in feature pages, > presumably as separate tabs (added to the list of resources things that > would go along with relationships, annotated sequence, etc). I would like > to do this for the GMOD in the Cloud/Box and would like for it to remain > usable from one point release to the next. I'm guessing there is > documentation on how to do something like this; could you please point it > out for me? > > Also, I want to make links in GBrowse and JBrowse that go to the feature > pages in Tripal. Are the URLs always like > lowercase(genus/genus_species/uniquename)? > > Thanks, > Scott > > > -- > ------------------------------------------------------------------------ > Scott Cain, Ph. D. scott at scottcain > dot net > GMOD Coordinator (http://gmod.org/) 216-392-3087 > Ontario Institute for Cancer Research > > > ------------------------------------------------------------------------------ > October Webinars: Code for Performance > Free Intel webinars can help you accelerate application performance. > Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from > the latest Intel processors and coprocessors. See abstracts and register >http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk > > > > _______________________________________________ > Gmod-tripal-devel mailing lis...@li...://lists.sourceforge.net/lists/listinfo/gmod-tripal-devel > > > > > ------------------------------------------------------------------------------ > October Webinars: Code for Performance > Free Intel webinars can help you accelerate application performance. > Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most > from > the latest Intel processors and coprocessors. See abstracts and register > > http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk > _______________________________________________ > Gmod-tripal-devel mailing list > Gmo...@li... > https://lists.sourceforge.net/lists/listinfo/gmod-tripal-devel > > -- ------------------------------------------------------------------------ Scott Cain, Ph. D. scott at scottcain dot net GMOD Coordinator (http://gmod.org/) 216-392-3087 Ontario Institute for Cancer Research |