.

Most features of the Ensembl website can be altered, but the technique to use varies depending on which type of page or part of the template is involved.

Introduction

The first thing you need to understand is the difference in the ways static and dynamic pages are built.

A static page is a conventional HTML page. It is normally written as a simple file containing the page content only (see screenshot below), and Ensembl webcode modules wrap this page in a generic template.

screenshot

An example static page: /Homo_sapiens/index.html

A dynamic page is a Perl script which calls various modules from the web code. They in turn pull data from the Ensembl databases and convert it into tables and graphics to make the page content. The content is then wrapped in the site template, some of which (e.g. contextual menus in the left-hand column) will also be dynamically generated by the web code modules.

screenshot

An example dynamic page: /Homo_sapiens/mapview?chr=9

Now we can see how these pages are assembled from the Ensembl modules (all the modules shown in the diagram below are found in modules/EnsEMBL/Web):

screenshot

Object hierarchy for web pages

Plugin Namespace

There are two ways to modify the basic webcode:

  1. Replacing the method (aka standard Perl overriding) - you use the same namespace as the base module, and it will get used instead: /public-plugins/mirror/modules/EnsEMBL/Web/Module.pm
  2. Modifying the method - by using the alternative namespace specified in /conf/Plugins.pm, you can add methods to a module or produce "aggregate" methods that include code from several plugins: /public-plugins/mirror/modules/EnsEMBL/MyNamespace/Module.pm

Tutorials

With these basic concepts in place, we can look at how to alter or extend Ensembl in different ways:


 

© 2024 Inserm. Hosted by genouest.org. This product includes software developed by Ensembl.

                
GermOnline based on Ensembl release 50 - Jul 2008
HELP