Skip to main content
Chemistry LibreTexts

4.4: Adding Automatic Organizations and Thumbnails

  • Page ID
    148804
  • A common template used in the LibreTexts is the portfolio template that is used to make a dynamic, all-inclusive and easy to maintain table of contents of all daughter pages. For example, adding the text

     {{template.ShowOrg()}} 

    on a page will make up the following 2-by-n organization with each daughter page associated with a thumbnail image.

    mindtouch.png
    Figure: Portfolio template with thumbnails for the LibreTexts section

    Thumbnails

    A page thumbnail is an image you can add to any article that will automatically show up after using the ShowOrg template discussed above (red arrows below).

    image12.png

    Steps to add a thumbnail image to a page:

    • Step 1: The page must be classified as "Book/Unit" and not "Chapter" or "Section/Page" (refresh page if you switch it)
    • Step 2: The "page setting" grey bar just above the page title will need to be clicked
    • Step 3: The left box should say "Add page thumbnail" and if you hover over it you will see a little blue pencil in its upper right hand corner. Click that.
    • Step 4: Now click "Browse" to select the image file from your file system.

    Thumbnails

    Images should be prepared with a height of 150 pixels.

    To remove a page thumbnail, hover over the thumbnail image in Page settings and click the Delete (X) icon.

    All thumbnails should be openly licensed. Two sources are pixabay.com and pexels.com

    Page Ordering

    The LibreTexts platform uses a semantic system for the URLs of pages based on the title of the page. Hence, URLs are not a string of nonsensical numbers and letters but tell users exactly the page's hierarchy in the greater Library's hierarchy. For example, chapter 2 of Prof. Robert Belford's General Chemistry text shown below has a title of "2: Atoms, Molecules, and Ions" and the full URL (not fully resolved) is: "https://chem.libretexts.org/Courses/University_of_Arkansas_Little_Rock/Chem_1402%3A_General_Chemistry_1_(Belford)/Text/2%3A_Atoms%2C_Molecules%2C_and_Ions".

    This is long, but the organization is clear.

    clipboard_e5c5f68ab99588b709732cf4b54f311bb.png
    Figure 1:

    One aspect of linking titles and URLs is that the order in which the pages are shown is based on the title. So simple numbering schemes that are used in the library (e.g., "2.2: Atomic Number and Atomic Mass Unit") that start with "number: title" require a bit of effort to be shown in the correct (numerical) order. This is because the title "2.12: Hydrates" comes before "2.1: Atoms: Their Composition and Structure".

    clipboard_e11b9d29bd84f59a50bd036ae30a8dd15.png
    Figure 2

    For the presentation of the pages on the Chapter page, the order is based on the URL not the title, so the URL for this page must be changed (and preferably not the title). To fix this, each page with a title that includes the single digit prefix numbers (i.e., 0-9) must be edited slightly to "uncouple" the title from the URL. This is done via the pencil option used to edit the title of any page. For example, for the page "2.1: Atoms: Their Composition and Structure" page shown above, if a user (with editing privileges) clicks on that page and hovers the mouse over the title, a little pencil pops up next to the title that when clicked expands the title section like in Figure 3.

    Figure 3.png
    Figure 3

    This expansion gives users control of the page title, but also the URL. Again, the default is that they are linked together, but can be uncoupled via the "link" button on the side of the grayed-out URL. This grays out the link and now the URL and title can be independently edited (Figure 4).

    Figure 4.png
    Figure 4

    Back to the goal, which was to reorder the pages in proper numerical order. The prefix number for this page's URL is then converted to a two-digit number by adding a zero in front (Figure 5).

    Figure 5.png
    Figure 5

    Click on update title and the uncoupling is complete. This change does not alter the title, but only the URL. But, the order is now adjusted in the presentation. If we go back to the chapter 2 view (Figure 6) we can see that Section 2.1 is now before Section 2.12 as desired.

    clipboard_e5966756f06eb739cfe375efdb07db5b6.png
    Figure 6

    This process needs to be repeated for all pages with single-digit prefixes numbers. This procedure clearly only needs to be done for chapters with more than 9 sections. The LibreTexts development team is working on a more automated approach to address this.

    • Was this article helpful?