Turning Carriage Return / Line Feeds into HTML Line Breaks in Inmagic Genie

by Jonathan Jacobsen Wednesday, February 25, 2009 10:36 AM


If you have imported information into Genie from another source, using TextWorks or the importer, or typed it in directly in TextWorks, you may have lines of text that are separated only by line feeds, rather than entered as subfields.  They may have appeared to have the correct layout in TextWorks, but when displayed on the web in Genie, may appear to run together.

For example, text that started out like this:


Chapter 1: Feasibility

Chapter 2: Accountability

Chapter 3: Operational Issues

may appear online as:

ContentsChapter 1: FeasibilityChapter 2: AccountabilityChapter 3: Operational Issues

To have this appear as intended in Genie, you could edit each record individually in the Genie Catalog, but a faster way is to use TextWorks to Batch Replace those line breaks with subfield marks. (You will need to have access to the TextWorks Windows client to do this) .

To do this:

1. In TextWorks, search for all records with data in the field requiring modification, using the * wildcard in that field.

2. Select Records > Batch Modify from the TextWorks menu.

3. Complete the Batch Modify dialogue as follows:

  • Field to Modify: select the field requiring modification
  • Operation: "Substitute Text"
  • Affects: Matching
  • Find What: {LF}
  • Replace With: {SF}

{LF} represents a line feed or paragraph break. {SF} represents a subfield indicator.

4. Perform the batch modification to change all occurrences of the line feed character in the selected field in the selected records to a subfield indicator, then check the results in Genie.

Note: If you are at all in doubt about the batch modification process, backup your complete database before making any changes.

Next, you would edit the MyReports.config configuration file. In this file, find the OPACFull report and the relevant field within that report definition, and add the following line:


e.g. <Field Name="CatAbstract" Separator="&lt;br/&gt;"/>

This causes every subfield to be separated with the <br/> tag. Repeat for the CatalogFull report and any other reports in which this field appears.

Another option in Genie is to edit the MyReports.config file to wrap the field in <pre> tags, which causes the text to display exactly as entered, without the use of subfields. The disadvantage of this approach is that the text will appear in a fixed-width font and long lines will not wrap. If you wish to try this, edit the field definition as described above, in MyReports.config, to add

Header="&lt;pre&gt;"and Footer="&lt;/pre&gt;"

e.g. <Field Name="CatAbstract" Header="&lt;pre&gt;" Footer="&lt;/pre&gt;"/>

and see if you like this look in Genie.


All About Favicons

by Jonathan Jacobsen Wednesday, January 28, 2009 9:47 AM

Y'know those small images that appear in your web browser's address bar as you move from site to site? Or that appear in your list of favourites or bookmarks next to each site?


Those are Favicons, short for Favourites Icons. They are a great way to help users see at a glance what site is open in their browser, especially if they have several tabs open at once.

How do I create one?

A favicon is simply a 16 x 16 pixel square image.

Typically the icon is a representation of your organization's logo or letters of its name or colour scheme. The image below shows some examples open in separate tabs in the Firefox browser.


You can create one from scratch using your favourite image editing program (or asking your graphic designer for a favour), or you can use one of several online tools to create one for you.

These two tools generate icons from images you upload:



The following tool generates an icon from text you type (great for organizations without a logo, or one that doesn't reproduce well in the small size of an icon):


The image can be in any format supported that a web browser can display, such as GIF, PNG and JPEG.

How do I add one to my website?

Once you have an icon image, save it to a location on your web server. Traditionally the file was named "favicon.ico" and saved in the root folder. However, the latest browsers support alternate locations and file names.

If you choose to name your file favicon.ico, note that the image format may still be a PNG, GIF, JPEG, etc.; it's only the extension that is changed to ".ico".

To include the icon in your website, edit the pages to add one of the following lines to the <head> section:


<link rel="shortcut icon" href="favicon.ico" >


<link rel="icon" type="image/png" href="/path/favicon.png"/>

where type is the image type (e.g. png, jpg, gif, etc.) and href points to the image location on your web server.

Note that the first link tag example does not conform to W3C recommendations, so the second example is preferred.

How do I add one to my Inmagic WebPublisher PRO pages?

If you have used the Andornot Starter Kit to publish your textbase online, you may be able to simply edit the file "\layout\include\HeadTag.htm" to add the above line to the <head> section of most pages served by WebPublisher PRO. You may also need to edit your search pages. It all depends on how your site is configured.


Drug Policy Alliance Network Launches Genie

by Jonathan Jacobsen Monday, November 10, 2008 4:08 PM

The Lindesmith Library at the Drug Policy Alliance (DPA), a progressive American organization that promotes policy alternatives to the war on drugs, has just launched an online library of over 15,000 records related to drug policy. Based on Inmagic Genie, the library integrates data from three previously separate databases, providing a single search-point for a wealth of specialized resources. The records include books, videos and journals, as well as numerous online articles and resources.

Andornot provided data conversion services to DPA, converting data from a DB/TextWorks library catalog textbase and a periodicals textbase, as well as a ColdFusion Content Management System, into the Genie Catalog, Serials, and Orders modules.

A number of Genie configuration options were utilized to tailor this Genie site to the specific requirements of DPA and their users.

  • We configured the Genie OPAC to have a header at the top that matches the header on other pages related to the DPA Network Lindesmith Library (see our developer blog post on how we did this).
  • We installed our Autoboolean search script for the first time in Genie. This feature allows users to enter any keywords in selected fields in any order, and have the AND operator (&) applied. This was particularly useful for DPA in the author field, where author names have sometimes been entered as "First Name Last Name" and other times as "Last Name, First Name."
  • The OPAC InfoCart was renamed to Record List to (see our developer blog post on how we did this).

You can view some of the other configuration options Andornot has utilized in our Genie Demo site.

Please contact us for product pricing and consulting quotes.

Enhancing the Genie OPAC Page Header

by Jonathan Jacobsen Sunday, November 09, 2008 10:24 PM


The options for including a header across the top of the Genie OPAC pages that are supported by Genie out-of-the-box  are limited to referencing an image in the myGenie.config file, using the following line:

<add key="MyLogo" value="images/your_logo.gif" />

The image referenced in this line appears at the top of all OPAC pages. The image can be a small logo, or can extend the full width of the OPAC pages (approx. 800 pixels) to provide an eye-catching header. For some sites, this is all that is required.

However, if you want to have the Genie OPAC header match an existing public or internal website, a simple image may not be sufficient. Typically a header includes text, images and site navigation, so HTML may be required, not just an image.

You can insert a custom header that includes HTML in the Genie header by editing the OPAC .aspx files directly. These include:

  • opac.aspx
  • opac_report.aspx
  • opac_cart.aspx
  • opac_items_search.aspx
  • opac_items_report.aspx
  • opac_loans_checkout.aspx
  • opac_loans_report.aspx
  • login.aspx
  • logout.aspx

While you may include the complete header HTML in these .aspx pages directly, it is more efficient to place it in a separate file, then use an ASP.net user control to pull it in. For example, if a file called header.ascx is created and contains the HTML for the site header, then add the following statement at the top of opac.aspx:

<%@ Register Src="~/include/header.ascx" TagName="Header" TagPrefix="uc" %>

and the following statement immediately after the <body> tag in opac.aspx:

<uc:Header ID="Header1" runat="server"></uc:Header>

This will result in the contents of header.ascx being included in the page when served to the user.

By separating the header HTML from the page, rather than embedding it in each of the OPAC pages, it is easy to subsequently edit the header to match changes to the rest of the site, without having to edit each OPAC page.

The same technique may be used to include a footer, or any other secondary content, within the OPAC pages.

One caveat of this technique is that if future versions of Genie include changes to any of the OPAC .aspx pages, the upgrade process will likely overwrite the modified versions. It is therefore important to keep a backup copy of those pages, and following the upgrade, to edit the new OPAC .aspx pages to re-insert the above code.

Note also that in the above example, in the path "~/include/header.ascx", the ~ means "resolve to application root", which is typically the folder in which Genie is installed, and /include/ is a new folder created to store all the files and images related to the header, to keep it separate from the Genie files themselves.

Genie en Francais!

by Jonathan Jacobsen Friday, October 10, 2008 2:32 PM

When initially installed, Genie is set up with an English-language interface. However, Genie can also be set up with French-language screens so that staff and users can work in the language of their choice.


Installation is fairly straightforward using Inmagic's instructions and localization files, but does involve editing some Genie .config files.

From your library home page, you can direct end users to the OPAC and have it start in either language, simply by specifying the language in the URL.

e.g. will start the OPAC in Canadian French (this site is Andornot's Genie demo).

Library staff can also choose a language for working with the Catalog, Serials and other modules.

In both the OPAC and library staff area, a cookie is set to retain the language choice.

Contact Andornot or Inmagic, Inc. to obtain the French localization files and step-by-step instructions for installation.

Month List