This page has been moved to FSFE docs.

Dynamic Content Pages

Some pages on the main page of the FSFE are not build from a static source but dynamically from a set of files. This page will describe the structure and build process for these files.

Pages with dynamic content

Basic structure of the pages

The pages are build from three base files plus the files for the dynamic content, e.g. the collection of reviews for the book.

  1. The XHTML skeleton for the page structure, e.g. book-reviews.en.xhtml.

  2. A file defining the location of the sources for building the page from the dynamic content; e.g. book-reviews.sources

  3. A XSL file that performs the actual building of the page, e.g. book-reviews.xsl.

The XHTML that is produced by the XSL file will replace the <dynamic-content/> tag used in the skeleton file.

The directory defined in the sources file contains a number of XML files, that define the single items from which the page is build. For the book reviews and testimonials these are either dividers or items to be displayed. The XSL file automatically places the dividers such, that they are evenly distributed among the items. The filenames of items are starting with a four digit number, the filenames of the dividers are starting with a d followed by three digits. These numbers define the order of the items.

Structure of dividers

   1 <?xml version="1.0" encoding="UTF-8"?>
   2 <feed>
   3   <version>1</version>
   5   <divider
   6     id="dividerid"
   7     image="URI of the image used as divider">
   8     <text>
   9       Textual description of the image, displayed beneath the image and used as ALT text.
  10     </text>
  11   </divider>
  12 </feed>

Structure of items

The structure of a testimonial item looks like

   1 <?xml version="1.0" encoding="UTF-8"?>
   2 <feed>
   3   <version>1</version>
   5   <quote
   6       id="someid"
   7       image="URI of the persons image">
   8     <name>
   9      Name (and profession) of the person
  10     </name>
  11     <text>
  12       Quote of what they have to say about the FSFE. 
  13     </text>
  14   </quote>
  15 </feed>

Items for the book review listings have a similar format.

Translations of the content

The items and dividers for the dynamically generated pages have the same schema related to the translation of them as other files on the webpage. The *.en.xml file is the original English version of the file with a version to mark the different versions of the file. Translations are stored in separate files accordingly. Same for the skeleton XHTML file.

Adding new content

To add a new book review (testimonial, divider, ...) locate the directory that contains the dynamic page items and add the content for it using an existing file as template. Important is, that you use a unique id and a speaking filename. Once the new content is added, when the webpage is build (on the build server or locally on your machine using fsfe-build) the new item will be included in the dynamically generated page.

TechDocs/Mainpage/Dynamic_Content_Pages (last edited 2023-09-26 09:01:39 by irakli)