Skip to content
Aron Griffis edited this page Aug 27, 2018 · 19 revisions

Design Parameters

Design parameters can be used to hold information for customizing a design more easily. There are also special parameters that control what version of the Reader will be used, customize its display, and affect other features of a Tizra site.

Controlling design parameters

Design parameters have always been associated with a site design, allowing settings to be tested on staging before deployment to live. However, it was not possible to override these parameters on a title-by-title basis, or to set them to special values for other content, like Static Pages.

There are now more options for controlling design parameters for a site, or portions of a site, which include checking for properties with the same name, and using their values as overrides, if found. The following list describes the checks performed, ordered from highest to lowest priority:

  • User override If the user account has a property defined with the same name, with a non-blank value, that property value will be used. This is designed to allow customization of a design based on the logged-in account, typically used for instititutional customers.

  • Object override If the currently displayed object has a non-blank value for the property, it will be used.

  • Normal design parameter The property is exists in the design, and the value defined there is used (whether or not it is blank).

  • Site level default If you need to enable a site-wide default setting, Tizra can enable this as an advanced property setting.

Advanced site properties

Over time we will be making many existing advanced site properties into design properties wherever it makes sense, as existing settings will be preserved, but new override capabilities will be added.

The Main object for a pages

Tizra has a concept of the current object for each distinct URL on a site. This is either the site itself, or the Tizra object named in the URL, but if there is no such object, advanced site properties will still be checked.

So if you wanted to control the page thumbnail feature on a document-by-document basis, you would create a new document property UseThumbnailBrowser -- defining it as a true/false property (just as you would have defined the design parameter). Setting this property to true, would enable the Browser, and setting it to false would disable it.

List of Special Design Parameters

Some of these are described in more detail elsewhere, but this list is intended to summarize what parameters exist in a single place:

General Parameters

  • siteFavicon (string) URL of favicon to use for the site. Defaults to /aa_images/favicon.ico.

  • doctypeDeclaration (text) You can include an HTML doctype to be used for all non-reader Tizra pages.

  • contentTypeForHTML (string) You can set an alternate content-type for the delivery of HTML pages, for instance application/xhtml+xml

  • macroTemplatesIncludeMarkup (true/false) Set this on a site, (or publication) if you want any special templates in the markup to suppress automatically generated display of metadata. Can be used to create highly customized markup.

  • displayOverrideTemplate (text) Freemarker template that will be used instead of any Tizra-generated pages. This should only be used as a per-object override on a Static page, where it can be useful to create completely custom HTML content, with direct control over the HTML <head>, etc. While it is possible, defining it in a desing or on a Site level will completely disable all Tizra page formatting (including the reader). This is not recommended and is reserved for potential experimental use by Tizra staff.

  • suppressAllIndex (true/false) Suppress the display of the ALL letters index item in indexes, even if autoPagination is turned on. Allows optimization of response time for sites with very long publication lists.

  • autoPaginate (true/false) Enables automatic pagination of all list blocks in Tizra pages, and must be set true for the ALL option to be selectable in Index pages.

  • Tizra-Tizra-DefaultExclusions (JSON Array of strings) This JSON Array contains the names of views that should normally be marked as excluded from access when a new offer is created.

Reader-related

  • enableReadSpeaker (true/false) Determines whether ReadSpeaker text reading should be used. (The ReadSpeaker feature requires a paid vendor agreement, and additional configuration). Default false.

  • enableAnnotations (true/false) Determines whether Annotator.js scripts and reader markup should be enabled. You may want additional configuration as described in Annotations

  • tizraMobileBrowserMatch (string) Regular expression used to match browser strings to determine if the mobile version of the reader should be used on that browser. This is a Java regular expression. The default value is

    .*(iPad|iPhone|Android|iPod|Silk).*

  • defaultLinkTarget (string) Value of the link target attribute to be used for content links that do not have one specified in the source document. Defaults to _self

  • EnableNewReader (true/false) Should the Tizra reader be active for the site? (At this point very few sites attempt to create their own readers). Default false.

  • useBetaReader (true/false) Should the current production version of the reader be used, or the original version? Default false. (for compatibility, but we set to true for all new sites)

  • *at this point we highly recommend all sites set EnableNewReader and useBetaReader to true.

  • readerLogoLink (text) URL to be used in the href of the link from the Logo in the default reader header. Defaults to / (site home page).

  • readerCustomScripts (text) or (JavaScript file). If a text value, the javascript will be included directly in the document header whenever the reader is loaded. If a File value, it will be added to the <head> element of a document, and executed on the first load of the reader. The reader is implemented in jQuery Mobile, and you should read about that event model and avoid onLoad handlers. Please read about configuring the reader before using. Macro substitution is performed within the Javascript. If you wish to customize the reader at this level, please communicate with Tizra to make sure that your changes will fit the technical roadmap.

  • readerHeader (text) contains custom markup for the header of reader pages. This is intended for additional links to external javascript libraries, and is included after all stylesheets and the jQuery and jQueryMobile libraries, but before the readerCustomScripts.

  • readerMarkup (text) contains custom markup to replace the default header area in the reader. When defined, design parameters like readerLogoLink will no longer be functional unless you new template references them.

  • UseThumbnailBrowser (true/false) Should page thumbnails should appear across the bottom of the reader for orientation and navigation. Default false (for compatibility; we recommend their use).

  • spreadImages (number) how many pages should be displayed at a time in the reader. Setting this to 2 enables two-page spread display for a site design. Like other design parameters, can be overridden on an item-by-item basis. ** This is feature is a paid upgrade for use on a live site, but can be enabled on staging if you want to try it out **

  • firstLeftPage (number) number of the first page to be displayed in spread mode. If not specified, all pages of a book are treated as spreads (a default value of 1). All pages following this page will be part of spreads. ** This is feature is a paid upgrade for use on a live site, but can be enabled on staging **

  • enableAddThis (true/false) Should the AddThis social media plugin be active on reader pages. Default: true.

  • readerHelp (html/text) Contents of the help block. Cannot be a file parameter.

  • downloadHeader (string) The content of the header tag for the entire downloads area. Defaults to ${document name} resources.

  • filterInaccessibleSources (true/false) indicates whether Sources (attachment areas) should be hidden from view if the user does not have an active license that would grant them access to the contents of that attachment area. Could be be used (for example) to hide even the existence of Teacher resources from accounts with student licenses. Default value: false

  • includeProcessedSources (true/false) indicates whether File access links should be displayed for Source files for reader content (e.g. PdfSource). Default: false.

  • pdfDownloadHeader (html) The header that should be put above Excerpt downloads if enabled and present for a document. Default: All section downloads (PDF)

  • AttachmentsHeader, FreeAttachmentsHeader, ${source.name}Header (text) Header text to replace the system-generated header for an attachment source in the downloads area. Defaults: Display Name of source, if set, else Name of source.

  • attachments-url-prefix, freeAttachments-url-prefix,"${sourceName?lower_case}-url-prefix (string) A prefix for URL attachments in this source. Can be used to create Tizra-managed links to an external site whose base URL can be redefined without republishing documents. Default: no prefix used.

  • t-page-body-class (string) HTML classes to add the the <body> tag for a page. Default: no classes added.

  • alwaysUsePageImages (true/false) If set to true, the system will refuse to deliver page PDF files to any browser other than iOS. Exception is currently made for iOS on devices as a way to support pinch-to-zoom. If you are logged in as a Tizra administrator you will still be able to download a single-page PDF, for debugging purposes.

File parameters

The following parameters are File Parameters (or can be declared as Files in a design). A File value cannot be overridden by an object property or an advanced site setting.

  • readerLogo (File) Image file to be used as the logo in the default reader header area.

  • readerCSS (text) or (CSS file) CSS source to be added to the reader view. Please read about configuring the reader before using. Macro substitution is done within the CSS. This can be defined either as a text value for inline inclusion, or a File parameter to be linked (and which will be cached).

Legacy parameters

  • supportOldMarkup (true/false) Whether Tizra should generate tags and markup corresponding to Tizra V1.0. Default true (for compatibility), but we set it to false for all new sites. true is the recommended value.

  • useNewAttachmentLists (true/false) enables better lists of attachments, for sites that still have supportOldMarkup set to true. Does nothing for other sites.

Clone this wiki locally