General information

This Project was created in order to allow the authors to create new and dynamic content.

The site is multilanguage, with German and English, being German the default language.

The URLs are configured to be the same in both languages and created automatically using the default language, German.

The frontend recognizes that is a Drupal page because the path starts with /content, and then it will call to DDBJournal to get the page in HTML and it will 

includes the content into the Frontend page.

Software specification

Using Drupal 8, PostgreSQL 9.6.5, PHP 7.1 and Apache 2.4.6

Content types

Article

The articles have a mandatory field called "Category" that is used to create the URL path and to filter them.

There are two images fields, the rectangular and the square, depends on the design we will use the one or the other.

The editor can use the field Tags, used in the Archiv page "/content/journal/archiv" to search by the Facet Tag.

There are two fields where the author can write text, the body and the marginal. The first one it is displayed in the center of the page,

and the second one is used to create the right sidebar of the page.

Display Mode

Default

Uses when it is selected the detail page of the content

Journal/Overview Teaser Square

As the name says, it is used in the Journal Overview Page to create the teaser with Square Image.

Journal/Overview Teaser Rectangular

As the name says, it is used in the Journal Overview Page to create the teaser with Rectangular Image.

Teaser Article Image L

Uses the image with size L in the list by category of articles

  • /journal/aktuell
  • /journal/entdecken
  • /journal/hintergrund

Teaser Article Image M

Uses the image with size M in the /journal/archiv page

Teaser Article Image S

Uses the image with size M in the block "You might also be interested in"

Auxiliar 

This content is only editable for the Drupal Administrators, and it was created to create in Drupal the Person and the Kalenderblatt blocks that later it will be filled with content in the Frontend. 

It is also used to create the /journal page, that is a collection of blocks when this page was created, the Panels module was not ready to be used.

Display Mode

Default

Uses the module Panelizer to create the HTML structure of /journal

Journal/Overview Teaser Square

As the name says, it is used in the Journal Overview Page to create the teaser with Square Image, uses for Person and Kalenderblatt.

Journal/Overview Teaser Rectangular

As the name says, it is used in the Journal Overview Page to create the teaser with Rectangular Image, uses for Person and Kalenderblatt.


Basic Page

It is used to create general pages content that is not articles, it has only two fields, body and marginal and they are used as the ones in Articles.

Display Mode

Default

Uses when it is selected the detail page of the content

DDB Newsletter

Using the simplenews module it was created this content type with a specific field structure to follow the DDB Newsletter design.

Some part of this content is filled it by default like the footer,  these contents can be sent as a normal newsletter.

This content uses Paragraphs in is structure, in order to have more than one element with the same HTML structure but allow the editor to decide how many elements want to create in each content.

Display Mode

Default

Uses when it is selected the detail page of the content

Email

The version of the content uses when the newsletter is sent.

Event

What makes different this content are the fields Date period, Place and Category Event.

The place is a simple text but the Category Event is a taxonomy, that when the user type in the field will check if exits already in the system.

Those fields are used as facets in the Events page /ueber-uns/termine that includes a facet calendar.

Display Mode

Default

Uses when it is selected the detail page of the content

Teaser

This display mode is used in /ueber-uns/termine in each item of the list.

Exhibition

This content type is used only to create in DDB Journal some teasers list, but the detail page of those contents are not available from anonymous users,

it is used the external link URL to link those exhibitions with the element from http://ausstellungen.deutsche-digitale-bibliothek.de

Display Mode

Journal/Overview Teaser Square

As the name says, it is used in the Journal Overview Page to create the teaser with Square Image.

Journal/Overview Teaser Rectangular

As the name says, it is used in the Journal Overview Page to create the teaser with Rectangular Image.

Teaser

This display mode is used in /journal/ausstellungen in each item of the list. Uses the Image Square L as the category list pages of articles

FAQ

Created using the FAQ module from Drupal. It has a category field to be used as a filter.

Display Mode

Default

Uses when it is selected the detail page of the content

Hilfe

It has the same fields as Basic Page, created as another content type in order to have the content separated.

Display Mode

Default

Uses when it is selected the detail page of the content

Special Pages / Views

Help

The page under /hilfe is and basic page without content where a block from the Help menu is displayed using the module Menu block.

In this case, is configured as "Display all menu items"

In each Help content, another block is displayed using the same module and from the Help Menu but showing only the second menu level.

Teaser

Rest Page (/teaser) created from a view (/de/admin/structure/views/view/teaser_articles)  that return a list of JSON articles teasers from the entityqueue Teaser.

FAQ (Fragen und Antworten)

This page  (/ueber-uns/fragen-antworten) is a view with a View page and an attachment View.

In the view Page (/admin/structure/views/view/fragen_und_antworten) it is created the list with all the titles from the FAQ content display in an HTML list ordered by FAQ Category. There also added in the Header a context area with a link with id="top" used to create the "To Top" link.

In the view attachment, is created by an unformatted list ordered too by the Category and displaying the Title and the body of the FAQ content.

The result is a page where at the beginning we see the list of links created in the page and after that, we see the titles with the content created in the attachment.

Archive

Search page of articles, where a list of articles with the display mode "Teaser Article Image M" will be displayed. And in the right sidebar, there is a Search field three blocks with facets if there are content with those facets, Category, Tag and Month, where the month is the month

when the articles were created.

Selecting the facets the list result and the facet list will change. The rule says that the selection of two facets items from the same facet it will be done with an OR, and if they are from a different facet it will be done with an AND.

When changing the language of the page the selection should be restored because the result is different.

Journal

The journal page is from the Auxiliar content type, using the panalizer to display those content with that layout.

In the panalizer profile, a block will be added to each layout position. That blocks will be created from the view /admin/structure/views/view/overview_blocks

There are 15 blocks created from the entityqueue overview, using different displays mode (Square/Rectangular) depending on the position in the layout following the design.

Custom modules

DDB also interest

Module created to have a block where the author can decide article list to see.

There are two options, the first one the author can decide how many articles and the category and in the second one, the author can make a list with the specific articles to list.

Embetty Twitter Block

It creates a Twitter Timeline from Embetty, previously set up in the Block settings with the accounts values, and the number of elements to display.

Event Search

Custom Search page with Text Facets and Calendar facets. The reason why this module was created and not uses a Drupal Contrib module as Search API / Facets,

it is because it doesn't exist a Calendar Facets in those modules.

Node hider

Used to don't allow anonymous users to see the Auxiliar Detail Content Page.

Using Entities to create those content instead of Content-Type it will avoid that necessity. 

Custom block types

List of external links to a DDB Persons https://www.deutsche-digitale-bibliothek.de/journal/persons/?sort=51134587 uses to create dynamically the Auxiliar content Person, and later it will be displayed in the Block Person in the Journal Page.

Most Read

it is created to be able to choose a period of time and an article category and the number the elements in the block setting.

It will return a block display with the list of articles links found in  https://report.deutsche-digitale-bibliothek.de in the matomo statistics with the selected values.

If it doesn't find an article in the Drupal instance where the block is displayed, then it will not return that value.

If not article is found it will return a "Not found" message.

Entityqueues

An easy way to create a list of content. Using it the author can create easily that list and change the order of the elements.

Article Teaser

Here it is created a list of elements that later it will be used in the Rest view Teaser "/teaser" as a JSON list, and it will be used in the Frontend to create the list of teasers of the DDB Frontend Start Page.

Overview

Used to create the list of Articles and Exhibitions display in the /journal page. Depending on the position it will take a display mode Rectangular or Square.

Using this Entityqueues is created the next view /admin/structure/views/view/overview_blocks later used to create the template with the panelizer in the Auxiliar Content Type in the default display mode.

Media

In this project, all the images and files are added as a media, in order of creating a library of content to be reused.

Media types

Document Media

Used to add documents from the formats pdf zip doc docx

Image Media

Used to add images into the project, with copyright, description, link if required.

Image Group

Used to create a gallery of images, and display with the lightbox javascript library as is used in the Frontend.

Video

Used to add Video files from the formats mp4 mp3

Image Styles

Uses to create specific rules to handle the images, in order to show the image in the most optimized way but it looks as designed.

Responsive image styles

Every responsive image style will follow different breakpoints, in this case, it should choose the Journal Breakpoints that is following the specification of Bootstrap 3.

In the display mode of the content type, for the images fields, a Responsive Style should be selected.

Depending on each specific case, it will select a specific Image Style for each Responsive image Style and breakpoint.

Setting this like that, the browser will display the image in the Image Style according to the rules described in its Responsive Image Style profile.

Menu

Help

List of links used to create the menu blocks shows in the /hilfe page and in the hilfe contents.

Main

List of links display in the main menu of DDB Frontend, getting the Frontend JSON list as a Rest API, created from the module rest_menu_items and rest /api/menu_items/main

List of links display in the footer menu of DDB Frontend, getting the Frontend JSON list as a Rest API, created from the module rest_menu_items and rest /api/menu_items/footer

User Roles

In this project the user roles rights are incremental.

Means that to give to a new user the rights of creating new content and handle the menu, it is needed to assign the Role Author and DDB Administrator.

Administrador

 Default Drupal Super Administrador, with all the possible rights.

Author

With the rights of creating, edit, and publish new content.

Entityqueues, add new items in the already existed entityqueues.

Taxonomy, add terms in the already existed taxonomies

Blocklayout, edit and create custom blocks and place already existed blocks in the block layout.

Newsletter

With the extra right of sending and handling newsletter subscriptions.

DDB Administrador

Rights of creating new users, without giving the user role.

Newsletter rights as the Newsletter Role

Rights to translate the Interface

Menu, create new menus and add/edit menu items.

Layout/Theme

Custom Module "DDB Journal" that is a sub-theme from the Bootstrap Theme, that it uses Bootstrap 3. 

All the CSS and JS files used in the theme are described in the ddbjournal.libraries.yml file

CSS Files

In General in DDB Journal, there is the design for the DDB Journal specific Pages. The final result should be checked in the Frontend where the DDB Journal Pages will have applied the DDB Frontend CSS and the DDB Journal CSS.

There are different files for the different page sections and a general.css file where all the general rules are described.

The most different file is the mail.css used in the email version of the DDB newsletter.

JS Files

In the JS folder, the main file is event.js use to handle the calendar in the /termine page. That file uses the config.js file where is set the local variable cmd, that is used to build in the DDB Frontend an absolute URL to the DDB Journal.

This configuration in order to don't write the URL hard in the code and be able to write one per DDB Journal installation. The config.js is inside the git.ignore to don't be saved. 

 

Cronjobs

Drupal Cron runs every 3 hours, checking the current status of the site, including checking the new version of modules/core.

Cache

The global configuration of the cache for all the pages is 1 day, apart of that we are using a module called "Advanced page expiration" to decide which pages

should not be cached, we are using it to don't cache the /journal page, in order to see the person block rotate.

We have learned that the module is very sensitive and if the URL that you don't want to cache uses some parameters you have to put all the options with all the parameters to don't be cached.

More Info: https://cms.deutsche-digitale-bibliothek.de/en/admin/config/development/performance/ape

Newsletter/E-Mails

The DDB anonymous users don't use DDB Journal to subscribe to the newsletter but it uses to send the newsletters created also in DDB Journal.

The DDB Journal Editors before sending the newsletter will take that newsletter subscriptions list and it will import them into DDB Journal 

under https://cms.deutsche-digitale-bibliothek.de/de/admin/people/simplenews/import 

 

The DDB Journal Editors create a new content DDB Newsletter and will send to the subscribers, two versions of newsletters will be created,

the email version and the browser version. To create the email version it is used inline CSS and absolute URL for the images.

There are some background images used in the title that it will appear only in the Browser version but not in the email.

Publication of content in the Frontend

If a content is published in the production DDB Journal automatically it will be published in the Frontend.

If the URL in DDB Journal of the content is https://cms.deutsche-digitale-bibliothek.de/de/journal/aktuell/title-content

The URL in the Frontend is https://deutsche-digitale-bibliothek.de/content/journal/aktuell/title-content

 

Frontend knows if it is a DDB Journal Page if the path starts with /content, then I will get the Drupal Page and it will rewrite the relative URL from the 

images, files, links to make it absolute linked to the DDB Journal URL instead of the Frontend URL.

All these functions are done in the ContentService, ContentController... in ddb-common

Publication of menus in the Frontend

The Frontend is calling depending on the current language to these REST API to get the menus and to save it in the cache.

https://cms.deutsche-digitale-bibliothek.de/en/api/menu_items/main?client=DDB-NEXT&_format=json

https://cms.deutsche-digitale-bibliothek.de/en/api/menu_items/footer?client=DDB-NEXT&_format=json

https://cms.deutsche-digitale-bibliothek.de/de/api/menu_items/main?client=DDB-NEXT&_format=json

https://cms.deutsche-digitale-bibliothek.de/de/api/menu_items/footer?client=DDB-NEXT&_format=json

 

  • No labels