How to Create a Latest News Template in TYPO3 EXT:news

The EXT extension is one of the most widely used solutions for managing news content in TYPO3. Its default list and detail views work well for standard pages, but many websites need a separate latest-news section for the homepage, landing page, or sidebar.

How to Create a Latest News Template in TYPO3 EXT:news

This usually means displaying only a few recent records with a different layout from the main news list. To achieve this, you need to configure the plugin settings, register a custom template layout, and load a dedicated Fluid partial from your site package.

This guide explains the complete setup step by step, including sorting, record limits, template overrides, and common issues that may prevent the custom layout from appearing.

What You Will Build

By the end of this tutorial, you will have a custom Latest News template for the TYPO3 EXT:news extension that editors can select directly from the News plugin. This approach lets you display recent news with a dedicated layout while keeping the default list template unchanged.

The final result includes:

  • A custom Latest News block with a dedicated visual layout (add screenshot here)
  • A configurable number of news articles displayed
  • Automatic sorting with the newest articles shown first
  • A custom Fluid template and partial for the latest news layout
  • Direct links from each news item to its detail page
  • A responsive layout that works across desktop, tablet, and mobile devices

Before getting started with the configuration, take a look at the finished Latest News block. Seeing the final result first provides a clear understanding of what you will build and how the completed implementation should look.

Requirements and Version Compatibility

Before creating a custom Latest News layout, ensure your TYPO3 project is using a compatible version of TYPO3 and EXT:news, and that the required News configuration is already in place.

Supported TYPO3 and EXT:news Versions

Component

Recommended Version

TYPO3

13.4 LTS or 14.x

EXT:news

13.x or 14.x

PHP

Match the selected TYPO3 and EXT:news release

Configuration

Site Set or TypoScript setup

Template Storage

Custom site package

Note: EXT:news 14 supports TYPO3 13–14 and PHP 8.2–8.5.

What Must Already Be Configured

Before implementing an EXT:news custom template, verify that the following prerequisites are complete:

  • EXT:news is installed and configured.
  • A storage folder (Storage PID) is available for news records.
  • Sample news records have been created for testing.
  • A News Detail page is configured and linked to the News plugin.
  • A custom site package is available for storing Fluid templates, partials, and TypoScript.
  • Appropriate backend permissions are assigned to editors and administrators.

Having these prerequisites in place makes it straightforward to implement a TYPO3 news template override without modifying the EXT:news extension itself. This approach keeps your implementation maintainable, upgrade-friendly, and easy to extend with additional custom layouts in the future.

How the Latest News Setup Works

Creating a custom Latest News layout in EXT:news involves four simple layers that work together. Each layer has a specific responsibility, making the implementation easy to maintain and extend.

  1. The News plugin retrieves the latest records.
    The News List plugin queries the configured storage folder and displays the latest news items based on the selected sorting and filtering options.
  2. Page TSConfig adds a selectable layout.
    A custom template layout is registered in Page TSConfig, making it available as a selectable option in the News plugin.
  3. Fluid checks the selected layout.
    The List template evaluates the selected template layout and decides which partial should be rendered.
  4. A custom partial controls the HTML output.
    A dedicated Fluid partial contains the custom HTML and markup for the Latest News block while leaving the default layout untouched.

Template vs Layout vs Partial

Term

Definition

Template

A Fluid template defines the overall page or plugin output structure.

Layout

A template layout lets editors choose between different frontend presentations.

Partial

A partial is a reusable Fluid file that renders a specific section of HTML.

Step 1: Configure the News Plugin to Show the Latest Records

Configure the News Plugin to Show the Latest Records

Before creating a custom template layout, configure the News List plugin to retrieve the correct records. This ensures your TYPO3 latest news list displays the newest content before applying any custom Fluid templates.

Configure the News plugin as follows:

  • Select the News List plugin.
  • Choose the correct Storage Folder (Storage PID).
  • Sort records by the News Date (datetime) field.
  • Use Descending sort order so the newest articles appear first.
  • Set the desired number of displayed records.
  • Disable pagination for homepage or landing page news blocks.
  • Select the News Detail Page.
  • Apply category filtering if only specific news categories should be displayed.

Recommended Homepage Settings

Setting

Recommended Value

Plugin

News List

Storage Folder

Your News Storage PID

Sorting

News Date

Sort Order

Descending

Maximum Items

3–6

Pagination

Disabled

Detail Page

News Detail Page

Categories

Optional

Optional TypoScript Configuration

If you prefer to manage the TYPO3 latest news list entirely through TypoScript instead of allowing editors to change plugin settings, you can configure the plugin defaults in TypoScript.

plugin.tx_news.settings {
  list {
      paginate {
          itemsPerPage = 5
          insertAbove = 0
          insertBelow = 0
      }
  }

  orderBy = datetime
  orderDirection = desc
  startingpoint = {$plugin.tx_news.storagePid}
  detailPid = {$plugin.tx_news.detailPid}
}

Using TypoScript for these settings helps maintain consistent news listings across multiple pages while reducing the risk of configuration changes in the backend.

Step 2: Add the Latest News Layout with Page TSConfig

Add the Latest News Layout with Page TSConfig

Once the News plugin is configured to display the latest records, the next step is to register a custom template layout. This makes your Latest News layout available as a selectable option in the News plugin.

Register a Custom Template Layout

Add the following Page TSConfig to your site.

tx_news.templateLayouts {
   10 = Latest News Layout
}

Unlike TypoScript Setup, Page TSConfig extends the TYPO3 backend. It is used to provide additional configuration options for editors, such as custom template layouts.

You can add this configuration in one of the following locations:

  • Your site package Page TSConfig
  • A dedicated Page TSConfig file
  • The root page's Page TSConfig (not recommended for larger projects)

Use a Numeric Layout Identifier

The current EXT:news implementation recommends using numeric identifiers instead of text keys.

tx_news.templateLayouts {
   10 = Latest News Layout
   20 = Featured News Layout
}

Numeric identifiers provide a stable value that can be referenced in your Fluid templates.

Optional XLIFF Translation Label

For multilingual TYPO3 backends, use an XLIFF label instead of hardcoded text.

tx_news.templateLayouts {
   10 = LLL:EXT:site_package/Resources/Private/Language/locallang_be.xlf:news.templateLayout.latest
}

This allows the template layout label to be translated automatically based on the editor's backend language.

Page TSConfig vs TypoScript Setup

Page TSConfig

TypoScript Setup

Configures TYPO3 backend behaviour.

Configures frontend rendering.

Adds backend options such as template layouts.

Controls frontend output and plugin settings.

Used by editors and administrators.

Used during page rendering.

Confirm the Layout Is Available

After clearing the TYPO3 cache, open your News plugin and navigate to:

Content Element → Plugin → News → Template → Template Layout

The dropdown should now contain:

Latest News Layout

Select the option and save the content element.

Why is my EXT:news template layout missing?

If the layout does not appear, verify that:

  • Page TSConfig has been loaded correctly.
  • TYPO3 caches have been cleared.
  • You are editing a News List plugin.
  • The Page TSConfig is assigned to the current page tree.
  • There are no syntax errors in your TSConfig.

Step 3: Create a Safe EXT:news Template Override

Never modify the original files inside EXT:news. Instead, override templates from your own project or site package. This approach keeps your implementation upgrade-safe and ensures future extension updates do not overwrite your customizations.

Do Not Edit the Original EXT:news Files

The files located in:

EXT:news/Resources/Private/

should always be treated as read-only.

If you modify these files directly, every extension update may overwrite your changes.

Instead, place all custom templates inside your own site package.

Recommended Site-Package Folder Structure

site_package/
└── Resources
   └── Private
       ├── Layouts
       │   └── News
       ├── Partials
       │   └── News
       │       └── List
       │           ├── Item.html
       │           └── LatestNews.html
       └── Templates
           └── News
               ├── List.html
               └── Detail.html

Keeping templates, layouts and partials together in your site package makes maintenance much easier.

Configure Template, Partial, and Layout Paths

Configure EXT:news to use your project templates before the extension defaults.

plugin.tx_news {
   view {
       templateRootPaths {
           10 = EXT:site_package/Resources/Private/Templates/News/
       }

       partialRootPaths {
           10 = EXT:site_package/Resources/Private/Partials/News/
       }

       layoutRootPaths {
           10 = EXT:site_package/Resources/Private/Layouts/News/
       }
   }
}

If you are using TYPO3 Site Sets, configure the corresponding view paths within your Site Set instead of placing them directly in your TypoScript setup.

For more details about template overriding, refer to the official EXT:news documentation.

Verify Path Priority

TYPO3 evaluates root paths according to their priority.

Your project-specific override should always have the highest priority so TYPO3 loads your custom templates before the default templates provided by EXT:news.

This ensures your custom Latest News template is rendered without modifying the extension itself.

Step 4: Select the Template Layout in the News Plugin

Select the Template Layout in the News Plugin

After registering the custom layout and configuring your template override, assign the layout to the News plugin.

Open the News List content element and navigate to:

Content Element → Plugin → News → Template → Template Layout

Select:

Latest News Layout

Save the content element.

After saving, TYPO3 will pass the selected template layout to your Fluid template, allowing your conditional rendering logic to load the LatestNews.html partial instead of the default Item.html partial.

If the new layout is not immediately visible:

  • Clear all TYPO3 caches.
  • Reload the backend.
  • Reopen the News content element if necessary.

Once the layout is selected, you are ready to implement the custom Fluid rendering logic in the next step.

Step 5: Update the EXT:news Fluid List Template

With the template layout registered and selected in the News plugin, the final step is to update the Fluid template so it renders your custom partial whenever the Latest News Layout is selected.

Copy the Default List Template

Do not edit the original template provided by EXT:news. Instead, copy the default template into your site package.

Source

EXT:news/Resources/Private/Templates/News/List.html

Destination

EXT:site_package/Resources/Private/Templates/News/List.html

Working from your own site package ensures that future EXT:news updates will not overwrite your customizations.

Check settings.templateLayout

Since the template layout is registered with a numeric identifier, compare the selected value using that identifier.

<f:if condition="{settings.templateLayout} == 10">
   <f:then>
                  partial="List/LatestNews"
           arguments="{news: news, settings: settings, className: className}" />
   </f:then>

   <f:else>
       <f:for each="{news}" as="newsItem">
                          partial="List/Item"
               arguments="{newsItem: newsItem, settings: settings, className: className, view: 'list'}" />
       </f:for>
   </f:else>
</f:if>

Render the Latest News Partial

Keep the conditional logic simple by rendering a dedicated partial.

Instead of placing all HTML inside the <f:if> statement, move the custom markup into:

Partials/News/List/LatestNews.html

This keeps the List template clean and makes future layout changes much easier.

Preserve the Default List Layout

Always retain the default Item partial in the fallback branch.

If another template layout—or no layout at all—is selected, the standard EXT:news list rendering continues to work without any additional changes.

Add a No-News Fallback

Handle the case where no news records are available by displaying a clear empty-state message.

<f:if condition="{news}">
   <f:then>

       <f:if condition="{settings.templateLayout} == 10">
           <f:then>
               <f:render
                   partial="List/LatestNews"
                   arguments="{news: news, settings: settings}" />
           </f:then>

           <f:else>
               <f:for each="{news}" as="newsItem">
                   <f:render
                       partial="List/Item"
                       arguments="{newsItem: newsItem, settings: settings, className: className, view: 'list'}" />
               </f:for>
           </f:else>

       </f:if>

   </f:then>

   <f:else>
       <p class="news-empty">
           No news articles are available at the moment.
       </p>
   </f:else>

</f:if>
 

This approach keeps your implementation modular while providing a graceful fallback when no news records exist.

Step 6: Build the LatestNews.html Partialn

The LatestNews.html partial is responsible for the frontend markup of your custom Latest News block. It should contain only the HTML required for the custom layout, while all rendering decisions remain in the List template.

A well-designed partial typically includes:

  • Article wrapper
  • Semantic heading structure
  • News title
  • Publication date
  • Teaser text
  • Preview image
  • Link to the detail page
  • Optional category label
  • "View all news" link
  • Accessible link text
  • Meaningful image alternative text
  • Fallback when no preview image exists

Recommended HTML Structure

The following example provides a clean, accessible starting point.

<section class="latest-news">

   <f:for each="{news}" as="newsItem">

       <article class="latest-news__item">

           <f:if condition="{newsItem.falMedia}">
               <f:then>
                   <f:image
                       image="{newsItem.falMedia.0}"
                       alt="{newsItem.title}"
                       class="latest-news__image" />
               </f:then>

               <f:else>
                   <div class="latest-news__image-placeholder">
                       No preview image available
                   </div>
               </f:else>
           </f:if>

           <div class="latest-news__content">

               <f:if condition="{newsItem.categories}">
                   <span class="latest-news__category">
                       {newsItem.categories.0.title}
                   </span>
               </f:if>

               <h2 class="latest-news__title">
                   <f:link.action
                       action="detail"
                       arguments="{news: newsItem}"
                       title="Read more about {newsItem.title}">
                       {newsItem.title}
                   </f:link.action>
               </h2>

               <time datetime="{newsItem.datetime -> f:format.date(format:'Y-m-d')}">
                   <f:format.date format="F j, Y">
                       {newsItem.datetime}
                   </f:format.date>
               </time>

               <p class="latest-news__teaser">
                   {newsItem.teaser}
               </p>

           </div>

       </article>

   </f:for>

   <p class="latest-news__all">
       <a href="/news/" aria-label="View all news articles">
           View all news
       </a>
   </p>

</section>

Keep the Markup Accessible

When building a custom Latest News template, follow basic accessibility best practices:

  • Use semantic elements such as <section> and <article>.
  • Keep the heading hierarchy consistent with the surrounding page.
  • Ensure every news link clearly describes its destination.
  • Provide meaningful alt text for preview images.
  • Display a fallback when no preview image is available.
  • Make all interactive elements keyboard accessible.
  • Use descriptive link text such as "View all news" instead of generic labels like "Click here."

Following these practices improves usability for all visitors while supporting better accessibility and SEO.

Step 7: Add Responsive Styling

After creating the LatestNews.html partial, add responsive styling to ensure the Latest News block displays consistently across desktops, tablets, and mobile devices.

A responsive layout improves readability while keeping the design flexible for different screen sizes.

Recommended CSS Structure

Organize your CSS using reusable class names that clearly separate the component and its elements.

.latest-news
.latest-news__grid
.latest-news__item
.latest-news__image
.latest-news__content
.latest-news__category
.latest-news__title
.latest-news__date
.latest-news__teaser
.latest-news__link

Grid Behaviour

Use CSS Grid or Flexbox to create a flexible layout.

  • Display multiple news cards on larger screens.
  • Reduce the number of columns as the viewport becomes smaller.
  • Allow cards to grow naturally without fixed widths.

Image Aspect Ratio

Use a consistent aspect ratio for preview images to create a uniform layout.

For example:

  • 16:9
  • 4:3
  • 1:1

Apply object-fit: cover so images fill the available space without distortion.

Mobile Stacking

On smaller screens:

  • Display a single-column layout.
  • Stack the image above the content.
  • Increase spacing between news items for improved readability.
  • Ensure text remains readable without horizontal scrolling.

Focus States

Interactive elements should remain accessible for keyboard users.

Provide visible focus styles for:

  • News detail links
  • "View all news" link
  • Any interactive buttons

Avoid removing the browser's default focus outline unless it is replaced with an equally visible alternative.

Avoid Fixed Heights

Avoid assigning fixed heights to cards or content areas.

Instead, allow each news item to expand naturally according to:

  • Title length
  • Teaser length
  • Image availability

This prevents content from being clipped.

Prevent Layout Shifts

To reduce layout shifts during page loading:

  • Reserve space for preview images using a fixed aspect ratio.
  • Define image dimensions whenever possible.
  • Keep consistent spacing between elements.
  • Load images responsively.

These practices contribute to a smoother user experience and improve Core Web Vitals.

Expected Desktop Result

Insert a screenshot of the completed Latest News block displayed in a multi-column desktop layout.

Suggested caption:
Desktop view of the custom Latest News layout showing responsive cards, preview images, publication dates, and links to the full news articles.

Expected Mobile Result

Insert a screenshot of the Latest News block displayed on a mobile device with stacked news cards.

Suggested caption:
Mobile view of the Latest News layout with vertically stacked articles, responsive images, and touch-friendly navigation.

Note: Keep important explanations, captions, and implementation details as HTML text rather than embedding them only inside screenshots. This ensures search engines and AI-powered search systems can crawl and understand the content.

Step 8: Clear Caches and Test the Result

Before publishing your implementation, verify that every part of the custom Latest News layout is working as expected.

Use the following checklist during testing:

  • Clear all TYPO3 caches.
  • Reload the TYPO3 backend.
  • Confirm that the Latest News Layout appears in the Template Layout selector.
  • Verify that news articles are sorted from newest to oldest.
  • Confirm the configured maximum number of news items is displayed.
  • Verify that the custom LatestNews.html partial is rendered.
  • Test that every news item links to the correct detail page.
  • Verify the empty-state message appears when no news records are available.
  • Test the layout on desktop, tablet, and mobile devices.
  • Confirm that the default News List layout still works correctly when the custom template layout is not selected.

Completing these checks helps ensure your custom EXT:news template functions correctly, remains upgrade-safe, and provides a consistent experience across different devices and content scenarios.

Common EXT:news Template Problems

Common EXT:news Template Issues

Even with a correct implementation, small configuration issues can prevent your custom Latest News template from working as expected. The following troubleshooting guide covers the most common problems and their solutions.

Template Layout Is Not Visible

Direct fix: Verify that the Page TSConfig is loaded for the current page tree, then clear all TYPO3 caches and reload the backend.

If the custom template layout does not appear in the Template Layout dropdown:

  • Confirm that the Page TSConfig containing tx_news.templateLayouts is assigned to the correct page or site package.
  • Check for syntax errors in your TSConfig.
  • Clear all TYPO3 caches.
  • Reload the TYPO3 backend and reopen the News content element.

Why this happens:
Template layouts are registered through Page TSConfig, not TypoScript Setup. If the TSConfig is not loaded, TYPO3 cannot display the layout option in the backend.

The Default News Partial Still Appears

Direct fix: Verify that the selected template layout identifier matches the Fluid condition and that TYPO3 is loading your template override.

Check the following:

  • The registered numeric layout identifier (for example, 10) matches the selected value in the News plugin.
  • Your Fluid condition compares the same numeric identifier.
  • Template, Partial, and Layout root paths point to your site package.
  • TYPO3 caches have been cleared after making changes.

Why this happens:
If TYPO3 cannot find your custom template or the layout identifier does not match, it automatically renders the default Item.html partial.

The Latest News List Is Empty

Direct fix: Verify that the News plugin is configured to retrieve the correct records.

Review the following settings:

  • Storage PID (Starting Point)
  • Hidden or deleted records
  • Start and end time restrictions
  • Language overlays
  • Category filters
  • Recursive storage depth
  • Access permissions

Why this happens:
If no records match the configured filters or the storage folder is incorrect, the News plugin returns an empty result.

News Is Not Ordered Newest First

Direct fix: Configure the News plugin to sort by the news date in descending order.

Verify that:

  • The Date (datetime) field is used for sorting.
  • orderBy is configured correctly.
  • The sorting direction is Descending (desc).
  • Plugin settings are not overriding the expected order.

Why this happens:
An incorrect sort field or ascending order causes older news articles to appear before newer ones.

Detail Links Open the Wrong Page

Direct fix: Check the configured Detail Page and detailPid.

Verify that:

  • The News Detail page exists.
  • The News Detail plugin is placed on that page.
  • detailPid references the correct page.
  • Site routing and Route Enhancers are configured correctly.

Why this happens:
If TYPO3 cannot resolve the correct detail page, generated links may point to the wrong location or produce 404 errors.

Changes Disappear After an EXT:news Update

Direct fix: Store all custom templates inside your site package.

Never modify files inside:

EXT:news/Resources/Private/

Instead, place your overrides in your project, for example:

EXT:site_package/Resources/Private/

Why this happens:
Extension updates replace the original files inside EXT:news, overwriting any direct modifications.

The Same News Appears Twice

Direct fix: Enable excludeAlreadyDisplayedNews when multiple News plugins are used on the same page.

This is especially useful when displaying:

  • Featured News
  • Latest News
  • Category-based News
  • Sidebar News

on a single page.

Why this happens:
Each News plugin performs its own query. Without excluding previously rendered records, the same article can appear in multiple lists.

Alternative Method: Use a Custom TypoScript Flag

Using the Template Layout selector is the most editor-friendly approach, but it is not the only option. If you want developers to control the rendering entirely through configuration, you can use a custom TypoScript setting.

Define a Custom Setting

Create a custom TypoScript flag.

plugin.tx_news.settings {
   isLatest = 1
}

Check the Setting in Fluid

Evaluate the custom setting in your Fluid template.

<f:if condition="{settings.isLatest}">
   <f:then>
       <f:render partial="List/LatestNews" arguments="{news: news}" />
   </f:then>
   <f:else>
       <f:render partial="List/Item" arguments="{news: news}" />
   </f:else>
</f:if>

When Should You Use This Approach?

A custom TypoScript flag is recommended when:

  • The layout should always be controlled by developers.
  • Editors should not be able to change the layout.
  • Multiple websites share the same implementation.
  • The rendering depends on project-specific logic.

The Template Layout selector remains the better choice when editors need the flexibility to choose different layouts directly from the TYPO3 backend.

EXT:news Latest Template Checklist

Before publishing your implementation, verify that each of the following steps has been completed.

Checklist:

  • Compatible EXT:news version is installed
  • Custom site package is active
  • Latest News plugin is configured correctly
  • Numeric template layout identifier is registered
  • Custom template layout is selected in the News plugin
  • Template, Partial, and Layout root paths are configured
  • Fluid condition checks the selected layout
  • LatestNews.html partial has been created
  • TYPO3 caches have been cleared
  • Frontend has been tested on desktop, tablet, and mobile devices
  • Default News List layout still works correctly

Completing this checklist ensures your custom EXT:news template is maintainable, upgrade-safe, and ready for production use.

Conclusion

You have successfully configured a custom Latest News layout for EXT:news by:

  • Configuring the News List plugin.
  • Registering a custom template layout.
  • Overriding the default templates in a site package.
  • Creating a custom Fluid partial.

Your website should now display a responsive Latest News block with the newest articles, a custom layout, and links to the detail pages.

To ensure long-term maintainability, always keep your template overrides in the site package and retest your implementation after major TYPO3 or EXT:news upgrades.

For more information, refer to the official EXT:news documentation.

FAQs

Yes. Register multiple template layouts in Page TSConfig and create a corresponding Fluid partial for each layout.

Store all templates, partials, and layouts in your site package to keep them upgrade-safe.

Sort by the News Date in descending order and set the record limit to 3.

Check that the Page TSConfig is loaded correctly, then clear the TYPO3 caches and reload the backend.

Yes. Once registered in Page TSConfig, the layout appears in the Template Layout dropdown of the News plugin.

Yes. It is fully compatible with TYPO3 v14 when using a supported version of EXT:news.

No. Always use a site package for template overrides to keep your implementation upgrade-safe.

Disable pagination in the News plugin or configure the record limit through TypoScript.

Free tool · Performance Checker

How fast does your TYPO3 website load?

Enter your URL: the Performance Checker measures load time and Core Web Vitals and shows what slows your page down.

  • Core Web Vitals
  • No login
  • Audit report in seconds

Comments and Responses

×

Name is required!

Enter valid name

Valid email is required!

Enter valid email address

Comment is required!

* These fields are required.

Be the First to Comment