Srophé Application : Documentation
Setting up new collections and submodules
Syriaca.org found it useful to have submodules with different styling and menu options for the different types of TEI data in the application. To create a collection with a distinct look and navigation you will need to add a few additional files.
-
Add the collection information to the
repo-config.xml
-
Set up a new template in
/templates
- Copy the
page.html
and rename it to match your new collection name - Add links to a new collection specific CSS stylesheet in the
html:head
following established pattern inpage.html
- Change menu items in your new collection template under:
<nav class="navbar navbar-default">
- Copy the
-
Add a new directory with the collection name to the application root directory, make sure it matches the name specified in the
repo-config.xml
file@app-root
. -
Add collection pages: example
index.html
,browse.html
,search.html
andrecord.html
All of these pages must point to the new template you created in step one, so at the top of each page change:<div xmlns="http://www.w3.org/1999/xhtml" xmlns:xi="http://www.w3.org/2001/XInclude" data-template="templates:surround" data-template-with="templates/page.html" data-template-at="content">
TO<div xmlns="http://www.w3.org/1999/xhtml" xmlns:xi="http://www.w3.org/2001/XInclude" data-template="templates:surround" data-template-with="templates/YOUR-TEMPLATE-NAME.html" data-template-at="content">
This will wrap your page content with the new page headers and footers in the declared template. -
Remember to add the collection variable to your search and browse pages to limit the scope of the search/browse action to the current collection. (See https://github.com/srophe/srophe/wiki/Browse-Options and https://github.com/srophe/srophe/wiki/Search-Options)