Jump to content

Customised templates

Overwrite templates by referring to your site package. Thanks to TYPO3's fallback system, you only need to overwrite the files you want to change.

MPC-RSS Logo

Setup

Via the site settings (recommended): Site administration > Your site > Settings > MPC RSS display paths.

Via TypoScript:

 
plugin.tx_mpcrss.view {
    templateRootPaths.30 = EXT:your_sitepackage/Resources/Private/Templates/
    partialRootPaths.30 = EXT:your_sitepackage/Resources/Private/Partials/
    layoutRootPaths.30 = EXT:your_sitepackage/Resources/Private/Layouts/
}
 

Expected file structure:

 
your_sitepackage/Resources/Private/
└── Templates/Feed/List.html
 

Template variables

Layout / Grouping:

VariableTypeDescription
{grouped}ArrayElements sorted by group name
{categories}arrayAll group names (for navigation)
{activeCategory}StringCurrently selected group
{showFilter}boolWhether navigation pills should be displayed
{groupingMode}Stringcategory, source, dateor none
{navigationLabel}StringTranslated heading for the navigation

Pagination (if enabled):

VariableTypeDescription
{paginate}boolPagination enabled
{pagination}arraypage, numPages, total, activeCategory
{pages}arrayPage numbers for the iteration

Feed element properties (within <f:for each="{entries}" as="entry">):

PropertyDescription
{entry.title}Plain text title
{entry.description}Cleaned-up HTML description
{entry.link}Article URL (http/https only)
{entry.date}Date string according to ISO 8601
{entry.image}Image URL or empty
{entry.sourceName}Display name of the feed source
{entry.categories}Array of RSS category strings

Example

 
<f:layout name="Default" />
<f:section name="Main">
  <f:for each="{grouped}" as="items" key="category">
    <h2>{category}</h2>
    <f:for each="{items}" as="item">
      <article>
        <h3><a href="{item.link}" target="_blank" rel="noopener noreferrer">{item.title}</a></h3>
        <f:if condition="{item.date}">
          <time datetime="{item.date}"><f:format.date date="{item.date}" format="d.m.Y" /></time>
        </f:if>
        <p>
          <f:format.stripTags>
            <f:format.crop maxCharacters="200" append="…">{item.description}</f:format.crop>
          </f:format.stripTags>
        </p>
      </article>
    </f:for>
  </f:for>
</f:section>
 

Safety: Use f:format.stripTags for descriptions – never f:format.html(). Descriptions are sourced from external feeds; removing tags from the template ensures comprehensive security.

 

Default template: EXT:mpc_rss/Resources/Private/Templates/Feed/List.html

Share page