PathwayWidget
From WikiPathways
m (Protected "PathwayWidget" [edit=sysop:move=sysop]) |
|||
Line 1: | Line 1: | ||
The pathway widget can be used to include a pathway viewer in your website. You can include a pathway widget by adding the following code snippet to your site: | The pathway widget can be used to include a pathway viewer in your website. You can include a pathway widget by adding the following code snippet to your site: | ||
- | <pre><nowiki><iframe src ="http:// | + | <pre><nowiki><iframe src ="http://www.wikipathways.org/wpi/PathwayWidget.php?id=PATHWAYID[&rev=REVISION]" width="500" height="500" style="overflow:hidden;"></iframe></nowiki></pre> |
In the iframe url, specify the ''id'' parameter by replacing PATHWAYID with the identifier of the pathway you want to add (e.g. WP4, you can find this identifier in the url of the pathway page) and optionally specify the ''rev'' parameter by replacing REVISION by a specific revision number of the pathway (you can find these in the ''history'' section on the pathway page). If you leave out the ''rev'' parameter, the widget will always show the most recent version of the pathway. | In the iframe url, specify the ''id'' parameter by replacing PATHWAYID with the identifier of the pathway you want to add (e.g. WP4, you can find this identifier in the url of the pathway page) and optionally specify the ''rev'' parameter by replacing REVISION by a specific revision number of the pathway (you can find these in the ''history'' section on the pathway page). If you leave out the ''rev'' parameter, the widget will always show the most recent version of the pathway. | ||
Line 10: | Line 10: | ||
To add a widget for the newest version of the [[Pathway:WP87|mouse nucleotide metabolism pathway]], use the following code snippet: | To add a widget for the newest version of the [[Pathway:WP87|mouse nucleotide metabolism pathway]], use the following code snippet: | ||
- | <pre><nowiki><iframe src ="http:// | + | <pre><nowiki><iframe src ="http://www.wikipathways.org/wpi/PathwayWidget.php?id=WP87" width="600px" height="300px" style="overflow:hidden;"></iframe></nowiki></pre> |
<html> | <html> | ||
- | <iframe src ="http:// | + | <iframe src ="http://www.wikipathways.org/wpi/PathwayWidget.php?id=WP87" width="600px" height="300px" style="overflow:hidden;"></iframe> |
</html> | </html> | ||
Line 19: | Line 19: | ||
To add a widget for a specific version of the pathway, lookup the revision in the ''history'' section on the pathway page and add it as the ''rev'' parameter to the ''iframe'' url. For example, to point to revision 7772 of the [[Pathway:WP87|mouse nucleotide metabolism pathway]], use the following code snippet: | To add a widget for a specific version of the pathway, lookup the revision in the ''history'' section on the pathway page and add it as the ''rev'' parameter to the ''iframe'' url. For example, to point to revision 7772 of the [[Pathway:WP87|mouse nucleotide metabolism pathway]], use the following code snippet: | ||
- | <pre><nowiki><iframe src ="http:// | + | <pre><nowiki><iframe src ="http://www.wikipathways.org/wpi/PathwayWidget.php?id=WP87&rev=7772" width="600px" height="300px" style="overflow:hidden;"></iframe></nowiki></pre> |
<html> | <html> | ||
- | <iframe src ="http:// | + | <iframe src ="http://www.wikipathways.org/wpi/PathwayWidget.php?id=WP87&rev=7772" width="600px" height="300px" style="overflow:hidden;"></iframe> |
</html> | </html> | ||
Line 28: | Line 28: | ||
You can change the size of the widget with the ''width'' and ''height'' parameters of the ''iframe'' tag: | You can change the size of the widget with the ''width'' and ''height'' parameters of the ''iframe'' tag: | ||
- | <pre><nowiki><iframe src ="http:// | + | <pre><nowiki><iframe src ="http://www.wikipathways.org/wpi/PathwayWidget.php?id=WP12" width="800px" height="300px" style="overflow:hidden;"></iframe></nowiki></pre> |
<html> | <html> | ||
- | <iframe src ="http:// | + | <iframe src ="http://www.wikipathways.org/wpi/PathwayWidget.php?id=WP12" width="800px" height="300px" style="overflow:hidden;"></iframe> |
</html> | </html> |
Revision as of 15:22, 5 March 2010
The pathway widget can be used to include a pathway viewer in your website. You can include a pathway widget by adding the following code snippet to your site:
<iframe src ="http://www.wikipathways.org/wpi/PathwayWidget.php?id=PATHWAYID[&rev=REVISION]" width="500" height="500" style="overflow:hidden;"></iframe>
In the iframe url, specify the id parameter by replacing PATHWAYID with the identifier of the pathway you want to add (e.g. WP4, you can find this identifier in the url of the pathway page) and optionally specify the rev parameter by replacing REVISION by a specific revision number of the pathway (you can find these in the history section on the pathway page). If you leave out the rev parameter, the widget will always show the most recent version of the pathway.
The pathway widget is still an experimental feature, we can't guarantee that it works correctly on any website. To help us further improve this feature, please let us know any problems via our mailinglist or bug tracker.
Examples
To add a widget for the newest version of the mouse nucleotide metabolism pathway, use the following code snippet:
<iframe src ="http://www.wikipathways.org/wpi/PathwayWidget.php?id=WP87" width="600px" height="300px" style="overflow:hidden;"></iframe>
<html> <iframe src ="http://www.wikipathways.org/wpi/PathwayWidget.php?id=WP87" width="600px" height="300px" style="overflow:hidden;"></iframe> </html>
Specific version of the pathway
To add a widget for a specific version of the pathway, lookup the revision in the history section on the pathway page and add it as the rev parameter to the iframe url. For example, to point to revision 7772 of the mouse nucleotide metabolism pathway, use the following code snippet:
<iframe src ="http://www.wikipathways.org/wpi/PathwayWidget.php?id=WP87&rev=7772" width="600px" height="300px" style="overflow:hidden;"></iframe>
<html> <iframe src ="http://www.wikipathways.org/wpi/PathwayWidget.php?id=WP87&rev=7772" width="600px" height="300px" style="overflow:hidden;"></iframe> </html>
Change the size of the widget
You can change the size of the widget with the width and height parameters of the iframe tag:
<iframe src ="http://www.wikipathways.org/wpi/PathwayWidget.php?id=WP12" width="800px" height="300px" style="overflow:hidden;"></iframe>
<html> <iframe src ="http://www.wikipathways.org/wpi/PathwayWidget.php?id=WP12" width="800px" height="300px" style="overflow:hidden;"></iframe> </html>