8.9: Adding Automatic Organizations
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()}}
after you save the page will show the following portfolio template at the bottom of the page
If you click on the + the portfolio menu will be displayed
The only one that LibreTexts uses is Topic hierarchy. After that is chosen, the page with the template looks like
The text comes from the summary in the Page Settings
Finally you should change the Guide listing display to Single to get a cleaner display
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.
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".
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.
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).
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).
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.
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 and it may be simpler to do using the remixer.