HomeTutorialsTNG: How to add custom collections for media
mediaCollections is a handy feature inside TNG, as it allows you to catalogue all of your digital media; images, sounds, videos; and to present your visitors with a tidy, organized layout of the visual and audio stories.  The standard types of categories built into TNG (see the article on “What is media?”) will work for most family studies.  Your study, however, might be more comprehensive or more complex, and you require more ‘pigeonholes’ for your image library. Can you add more categories to the Collection pulldown menu? Collection title suggestions But first, what should I add?  There is no one answer, as each person’s family tree study can be very unique.  Based on surveys of established TNG websites, there are some common themes that keep showing up.
  • Censuses
  • Marriages
  • Births
  • Deaths
  • Family Groups
  • Military
  • Research
  • Locations
  • DNA
  • Newspapers
  Limitations to Collections You can add as many collection titles as you need.  You can create subfolders, and subfolders of subfolders in your collections.  However, there are some practical considerations.  For example, all collections titles show up in the one pulldown menu; there are no sidebars for subtitles.  Which means that your Media pulldown list could get to be long, and perhaps will not show well on mobile devices. The use of sub-subfolders, while available, actually does not add any value to the TNG site, as any media folder is attached to a collections title, with no ranking above or below any other title.  So it is just easier to not do subfolders, and have one folder for each collections title.  This will be better explained as we walk through the process. Can I change the order of the Collections titles? Yes.  There is an ordering utility that will be described further down. The adding and editing of Collections is explained in more detail at the TNG Wiki website. Adding Collections You have to use administration privileges to add or edit or delete Collections. Next, decide on the categories that you want to add.  The naming of the categories will be used for the Collection ID, the display title and the folder name, so there are some guidelines.  Try to use short names.  Generally, titles are plural in nature (births, newspapers).
  • The Collection ID is an internal label and not displayed anywhere. It needs to be short, contain no spaces, have only alphanumeric characters, and ideally ten characters or less. For example, marriage certificates, banns, wedding cards, would be collected under “marriages”.
  • The display title is the name that you will see in the pulldown list under Media and wherever you are looking for items of Collections. This can be longer than the Collection ID and have spaces, however it should only be slightly longer, or your pulldown list will start using up a lot of horizontal screen width.  Now you can use “Military Records” if you choose.
  • The Folder Name choice will create the TNG internal folder that will house this category of digital media. As with Collection ID, it should be short, no spaces, only alphanumeric.  In fact, the best practise is to make it the same name as the ID.
  media-3     Time to add a collection title, so I am going to add “Censuses” to my TNG site.  Here is where we start (see left): the standard media pulldown list of all of our digital collections.         collections-1 Start on any screen that has the “Add Collection” button, such as on the Media, Add Media and Edit Media screen.  Click on the button and a pop-up form will appear.   collections-4 Collection ID, Display Title, Folder Name Fill in the Collection ID, Display Title and Folder Name boxes per the guidelines mentioned above. Export as When you export a GEDCOM file that includes media, the file will contain a line for each item indicating what type of media it is. This should be a single word in uppercase. For example, a photo will be exported with the type “PHOTO”. If you are creating a new Collection called “Newspapers”, you may want to put “NEWSPAPER” in this field. I decided to keep the “export as” to be PHOTO, to be generic with my GEDCOM file.  If your other family tree application, the one that would receive the GEDCOM file, can accept custom data, then go ahead and use other names. Folder Name This will be the name of the physical folder or directory on your web site where items in this collection will be stored. It should be relatively short, with no spaces and only alphanumeric characters (e.g., “censuses”). After entering a value, you can click on the “Make Folder” button to try and create it. You should see a message (“Success”) indicating whether the creation was successful or not. If your TNG website did not allow the operation, you will have to use an FTP program or an online file manager to create the folder. It should be created in the same parent folder as the “photos”, “documents”, “histories” and other Collections folder. Make sure the actual name matches the name you put here exactly, e.g., “Censuses” does not match “censuses”.

Icon File

TNG displays a small icon next to the collection display title in dropdown menus. You can use the existing icons within TNG, or if adventurous, you may create your own icon.  Icons are stored in the “img/” subfolder, so add icon filenames in the format of: “img/people_icon.gif” (replacing “people_” with your choice of icon filename). TNG has a default set of icon images waiting for you.  See the examples here. If an icon does not work out, you can go back and edit this collection and change the img file. collections-3collections-2 Thumbnail File If your media file does not have a thumbnail image for that particular media category, TNG will substitute it with a default image, typically 50 by 50 pixels in size.  You can upload your own thumbnail image, or use the defaults available in TNG. Display Order Enter a whole number here to indicate the order in which your custom Collection types will be displayed in the public drop-down menus. Lower numbers appear first. Note: in my limited testing, the Display Order did not seem to have an effect.  The custom category appeared just below the standard titles.  Perhaps “order” works with multiple custom media titles instead of just one.

Same setup as

The Add media and Edit media screens are hard-coded to prompt for additional fields for specific media collections. This “Same setup as” field allows you to indicate which of the standard Collection types your new Collection should resemble most, with regard to the layout of those screens. Note, the only collection with additional fields is the “Headstones” collection, which prompts for a headstone location status and the cemetery where the headstone is located. Now go ahead and save your new Collection.  Be sure to check it out for correct spelling and icon.

Comments are closed.