Changeset 203:2337fbf66c30
- Timestamp:
- 09/26/09 18:56:36 (11 months ago)
- Author:
- rgrp
- Branch:
- default
- convert_revision:
- svn:0ead1229-0713-0410-96cd-f668dbfad531/trunk@292
- Message:
-
[misc][s]: change guide to refer to 'new' multi controller and fix up minor typo in test.
- Location:
- shakespeare
- Files:
-
Legend:
- Unmodified
- Added
- Removed
-
|
r158
|
r203
|
|
| 16 | 16 | </h3> |
| 17 | 17 | <p> |
| 18 | | The <a href="${h.url_for(controller='text', action='index')}">text index |
| 19 | | page</a> contains a list of all of the material on the system. |
| | 18 | The <a href="${h.url_for(controller='work', action='index')}">work index |
| | 19 | page</a> contains a list of all of the works on the system and their |
| | 20 | associated 'material' (texts etc). |
| 20 | 21 | </p> |
| 21 | | <h3> |
| 22 | | Viewing Works |
| 23 | | </h3> |
| 24 | | <p> |
| 25 | | You can view works by clicking on the link available from the index page. |
| 26 | | If you know the 'name/id' of a text you can view it directly by visiting the |
| 27 | | url: ${h.url_for(controller='text', action='view', id='name')} (you can work |
| 28 | | out id names by looking at the link urls on the index page). |
| 29 | | </p> |
| 30 | | |
| 31 | | <h3>Viewing in different formats</h3> |
| 32 | | <p> |
| 33 | | You can view a given text in a different format by setting the format |
| 34 | | argument in the url query string like so: |
| 35 | | </p> |
| 36 | | <pre> |
| 37 | | ${h.url_for(controller='text', action='view', id='name', format='format_name')} |
| 38 | | </pre> |
| 39 | | <p> |
| 40 | | So to view the text with name id 'hamlet_gut' with line numbers shown you |
| 41 | | would visit (this link will only work if that text is indeed available on |
| 42 | | your system!): |
| 43 | | </p> |
| 44 | | <blockquote><p> |
| 45 | | <a href="${h.url_for(controller='text', action='view', id='hamlet_gut', format='lineno')}"> |
| 46 | | ${h.url_for(controller='text', action='view', id='hamlet_gut', format='lineno')}</a> |
| 47 | | </p></blockquote> |
| 48 | | <p> |
| 49 | | Available formats are: |
| 50 | | </p> |
| 51 | | <ul> |
| 52 | | <li>format=plain - plain version of the file (default)</li> |
| 53 | | <li>format=raw - raw file returned as text/plain</li> |
| 54 | | <li>format=lineno - text with line numbers added</li> |
| 55 | | </ul> |
| 56 | 22 | |
| 57 | 23 | <h3>Multiviews</h3> |
| … |
… |
|
| 60 | 26 | separated by '+'. For example to see the Gutenberg folio and non-folio |
| 61 | 27 | Othello side-by-side you would visit: <a |
| 62 | | href="${h.url_for(controller='text', action='view', id=None, name='othello_gut_f othello_gut')}"> |
| 63 | | ${h.url_for(controller='text', action='view', id=None, name='othello_gut_f othello_gut')} |
| | 28 | href="${h.url_for(controller='multi', action='view', id=None, text_1='othello_gut_f', text_2='othello_gut')}"> |
| | 29 | ${h.url_for(controller='multi', action='view', id=None, text_1='othello_gut_f', text_2='othello_gut')} |
| 64 | 30 | </a> |
| 65 | 31 | </p> |
-
|
r201
|
r203
|
|
| 67 | 67 | cache = shakespeare.cache.default |
| 68 | 68 | sometext = u'baa baa' |
| 69 | | path = 'testcache.txt' |
| | 69 | path = u'testcache.txt' |
| 70 | 70 | cache.save(path, sometext) |
| 71 | 71 | res = model.Resource(locator=path, locator_type=u'cache') |