Skip to main content

How to add content ?

There are basically two outlines of contents (Post, Book). The book layout shows a Book navigation (and free browsing) on the sidebar. While the post layout shows an article (like others) an image on top and a list (using views) of contents related by tags on the page.

Two Outlines of contents
  1. Adding Book Outline Content
  2. Adding Post Outline Content

 

Adding Book Outline Content

  1. Add a new article (with cover image and title Drupal), make it as a new Book. Give a nice url alias (/drupal) and add menu settings (under main navigation). One time settings.
  2.  Now add (Module 1 or Chapter 1) a new Article (with image and title Drupal 9 Book) but add Book outline set to the above Book (as parent) and Menu settings with the above as Parent Link. Now this will show in both Book Navigation because of Book settings and Menu because of Menu settings.
  3. Now add any Article (as book page) and only set Book outline for it as: Book 'Drupal 9 Book' (1 above) and Parent Item as : 'Module 1' ( 2 above).
  4. In Structure > Block Layout show Book Navigation for /drupal , /drupal/drupal9 and /articles/* (articles with pathauto for all Articles)

Adding Post Outline Content

  1. Add Vocabulary (Javascript) with tags (term) of Javascript (for listing all content under base category e.g React, Node also comes under Javascript) and add sub terms (for sub category) React, Node etc. One time settings.
  2. Add a (base category) new article (with cover image and title Javascript), make it as a new Book(to show it in Book Navigation menu, just the main category link). Give a nice url alias (/javascript) and add menu settings (under main navigation). Give a base tag(category name: Javascript). One time settings.
  3. Add a (sub category) new article (with image and title React, Node). Give a nice url alias (/javascript/react) and add menu settings (under --Javascript). One time settings.
  4. Add a View  (block) with base category name (Javascript List ) and add filter on 'Taxonomy has term' of Javascript to show all contents under major category. Copy this view to another Block view, just change taxonomy term to sub category (tag) for each sub category (React, Node). One time settings.
  5. Now we need to show these blocks in Content region for url paths (/javascript, /javascipt/react  etc) so add the three blocks i.e Javscript List, Javscript List: React, Javscript List: Node. One time settings.
  6.  Now add any new Article but add tags Javascript and a sub category tag like React or Node to it. No menu settings as we don't want all topics to be shown in either menu or Book Navigation (and hence no Book outline)