Jump to content
Wiki Home
EPrints Home
Bazaar
Files
Main menu
Main menu
move to sidebar
hide
Navigation
Front Page
EPrints 3 Manual
EPrints Training Course
EPrints Glossary
Installing EPrints
How-to Configure EPrints
EPrints 3.2+ API
EPrints 3 Reference
EPrints Plugins
Wiki
All categories
Recent changes
Main Page
Help
EPrints Documentation
Search
Search
Appearance
Log in
Request account
Personal tools
Log in
Request account
Pages for logged out editors
learn more
Contributions
Talk
Editing
How to
(section)
Page
Discussion
British English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Special pages
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==HOW TO: Set up a Complex Custom View== '''NOTE: http://wiki.eprints.org/w/Adding_new_views is a better page to start with for newer version of EPrints.''' Simple instructions are in the ArchiveConfig.pm section. Example situation: On my main website www.foobars.ac.uk I have a page per research project, of which we have hundreds. Each project has a short unique id code, eg. "manticore". I have a field in my eprints archive (eprints.foobars.ac.uk) which is configured: { name=>"projectcodes", type=>"text", multiple=>1 } I add the following browse view: { id=>"by_project", allow_null=>0, fields=>"projectcodes", order=>"-year/title" } This will generate a page http://eprints.foobars.ac.uk/views/by_project/manticore.html with a list of all papers in that project, we can link to that URL! ===Making the Field link to the Browse Page=== If you want a subject to link the subject browse page of that value, add the '''browse_link''' property to the field (and regenerate the abstracts if you want). If you remove the browse view you should remove the '''browse_link''' or it will be a broken link. Values rendered inside citations which are used to link to the main record will not link into the browse view for obvious reasons. ===Including a view in another page=== If you change that to: { id=>"by_project", allow_null=>0, fields=>"projectcodes", order=>"-year/title", noindex=>1, nolink=>1, nohtml=>1, include=>1 } This will generate a view which is '''NOT''' listed on the ''/view/'' page and it will not skip making the .html file and make a .include file per value. This will only contain the "count" of items and the XHTML of their citations. This can be used as part of a page on the http://www.foobaars.ac.uk/ site; either by using php and capturing it on-the-fly using <tt>readfile</tt> or scripting it with perl or NFS exporting the filesystem onto the main server (or just doing it all on one computer) and using server side includes to place it in a page. ===Customising the way each item is cited=== I want to list the project papers in a strict format in a table with 4 columns: title, author(s), year and an icon which links to the document abstract page... I add some ''more'' options to the browse view: { id=>"by_project", allow_null=>0, fields=>"projectcodes", order=>"-year/title", noindex=>1, nolink=>1, nohtml=>1, include=>1, nocount=>1, citation=>"project_table" } Now I add a new citation to the citations config file: <ep:citation type="project_table"> <tr> <td>&title;</td> <td>&authors;</td> <td>&year;</td> <td> <ep:linkhere> <img src="http://www.foobars.ac.uk/images/paperlink.png" alt="view" width="32" height="64" border="0" /> </ep:linkhere> </td> </tr> </ep:citation> That should generate for the manticore project, in the ".include" file (I've cut the contents of the "img" tag for readability: <tr> <td>Making Stuff</td> <td>Guy, A.</td> <td>2001</td> <td> <a href="http://eprints.foobar.ac.uk/archive/00000923/"> <img ... /> </a> </td> </tr> <tr> <td>Eating Food</td> <td>Herring, Walter and Chips, Bob</td> <td>2000</td> <td> <a href="http://eprints.foobar.ac.uk/archive/00000445/"> <img ... /> </a> </td> </tr> ===A "CV" page - a list of all of Alices records=== This is where the authors and editors field having an ID comes in handy. Say we use local username to identify people in the "Person ID" fields, we can now set up a view: { id=>"by_person", allow_null=>0, fields=>"authors.id/editors.id", order=>"-year/title", noindex=>1, include=>1 } This will generate both .html pages and .include pages. An member of your organisation can get a list of their records either by linking to <tt>/views/by_person/alice.html</tt> (where alice is their username) or by snarfing the URL <tt>/views/by_person/alice.include</tt> into his own homepage.
Summary:
Please note that all contributions to EPrints Documentation may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
EPrints Documentation:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)