# Static Content in Section pages

Some sections contain pieces of static content, like a brief explanation or introduction about the section itself:

tenant section

When the section is extracted, by default this content is lost, as rippers only look for links to articles. The Static Content detector, when it is well configured, allows to extract this kind of static content and prepends it at the beginning of the section.

Marfeel section

The static content detector is an improvement over the existing JSOUP static content configuration: the detector is entirely ripper-agnostic, and works for any type of section. 😎

# How it works

The following things happen when extracting a section with the static content detector on:

  1. The ripper extracts the section
  2. A special type of item with the section's URL is added at the top of the list of items extracted
  3. All the items are extracted, including the section itself

In other words, the very same section is extracted twice: 1) by the ripper (WhiteCollar, JSOUP, MarfeelPress...) to get the articles list and 2) as an article to get the static content part.

WARNING

Regardless of where the static content is on the Desktop page, Marfeel displays it at the top of the section page, before any article.

# How to configure

Configure the static content detector with the key-value "staticSection" : "fromSectionUrl" in the definition.json file.

You can use it either globally for all the sections or individually for each section.

Debugging

The extraction of static content follows the same logic we use for article content extraction. You can debug it from your Gutenberg instance by placing a breakpoint in the InsertStaticContentItemResultModifier class (opens new window).

# For all sections

Use the Static Content Detector in all the sections of a tenant with the global configuration object:







 




{
  [...]
  "title": "Title of the awesome example site",
  "uri": "www.example.com",
  "configuration": {
    [...]
    "staticSection": "fromSectionUrl"
  },
  [...]
}

The key-value pair is always the same.

# For a specific section

Use the Static Content Detector for a single section thanks to the section's configuration object:











 







{
  [...]
  "sectionDefinitions": [ {
    "name": "news",
    "title": "News",
    "feedDefinitions": [ {
      "uri": "https://example.com/news-info/",
      "alibabaDefinition": {
        "configuration": {
          [...]
          "staticSection": "fromSectionUrl"
        }
      }
    } ]
  }, {
  [...]
}

The key-value pair is always the same.