Daniel Siepmann - Coding is Art

Blog Post

Hidden TYPO3 gem EXT:feedit

Published: , Updated:

Tested with TYPO3: 10 LTS, 9 LTS

Topics: typo3

Introduction

TYPO3 has hidden gems. One of them is the system extension feedit which adds frontend editing to TYPO3. It adds some options to the admin panel in TYPO3 frontend, and allows integrators to add more fine grained edit experience right into the content.

This post will cover most of the provided features, with screenshots and how to configure the extension. I'll also explain why I prefer the approach of EXT:feedit over extensions like EXT:frontend_editing.

Concepts of frontend editing

First of all let me explain two different concepts how to edit frontend in TYPO3.

First Concept: Inline Editing

The first concept is provided by EXT:frontend_editing. Some of you might know this concept from other systems like Neos. I would call this concept "live editing" or "inline editing". The basic idea is to wrap your existing frontend with all the tools you need. E.g. add a page tree to the left, an inspector to the right. This is more or less the same concept as word processors like LibreOffice or Microsoft Word use. You have a real live view of your content and edit it inline. Every change is visible in the context of your rendered website in current view port.

This approach is very intuitive for editors that didn't work with any older CMS. There is no system to learn. You log into the system and see your website. Go ahead and edit whatever you want to change. For more fine grained adjustments there is the inspector, which let's you edit the ratio of an image and other specific stuff.

Second Concept: Structured Editing

One strength of TYPO3 is the structured content. In TYPO3 you have different types of content elements, all with their configured backend form. More or less all content information are saved in their own context and database fields. In order to keep this structure and still provide frontend editing, you would need to add information to your view and keep it in sync.

EXT:feedit still can provide a benefit, by not providing the same UX (=User Experience) to the editor as the concept above. Instead it will place little icons to interact with existing TYPO3 functionality. These icons are added to the admin panel and before or after all content elements and records. These Icons allow editors to hide or unhide, to sort and add elements, as well as opening an edit form for a content element, record or the page.

How EXT:feedit works

Now that we are aware of different concepts and the features of EXT:feedit, how does it work?

Frontend editing is provided in three different areas. The first one is the admin panel, which allows editors to work with the current page. The admin panel allows to open the current page in TYPO3 backend, edit the page, move the page, open list view or add new pages.

Also the admin panel allows to check two options. The first option is called "Display edit icons", the second one is called "Display edit panels". Both of them will be explained in more detail below, as they need to be configured by an TYPO3 integrator.

Features of feedit

Some features were already mentioned. Let's dig deeper into the features provided by EXT:feedit.

For an editor there is a single feature available by default: He can edit the current page via the admin panel.

All other features need to be configured by an integrator. The configuration is pretty easy, and TYPO3 EXT:fluid_styled_content is already pre configured.

The screenshots below will provide a better overview of the provided features.

Screenshots of EXT:feedit

EXT:feedit feature in admin panel. Allows to activate further features and edit current page.
Figure i15: Displays the features in admin panel. Allows to activate or deactivate further features configured by integrators. Also allows to edit the current page.
Screenshot of editPanel and editIcon in page context
Figure i16: A screenshot of custom styled editPanel and editIcon. The panel allows to edit, move, hide and delete the record.
Example of how frontend editing can be used with EXT:feedit
Figure i22: Screenshot of this website. There are two browser windows. The left one shows the website with active backend login and enabled icons by EXT:feedit. The right window shows the editing mask, opened by the icon. using the view button refreshes the left window, which allows for fast editing while seeing results instantly.

The editPanel

Example is from this website:

lib.contentElement = FLUIDTEMPLATE
lib.contentElement {
    stdWrap {
        editPanel = 1
        editPanel {
            printBeforeContent = 1
            allow = edit, new, delete, move, hide
        }
    }
}

That's one of the simplest approaches. The integrator enables the editPanel and configures it. Per default the panel will be displayed after content elements. I switch the behavior using printBeforeContent = 1.

Also there are different actions one can allow for the panel:

  • edit
    Opens the edit form. This is the same form as when opened from TYPO3 backend.
  • new
    Opens the default content element (first item in drop down) in editing mode.
    This could be improved in future, to use the "New Content Element" wizard.
  • delete
    Asks for confirmation before deleting the record.
  • move
    Allows editors to move the record, the same way as in list view of TYPO3 backend.
  • hide
    Asks for confirmation before hiding the record. If hidden records are displayed (which you can activate through admin panel), one can also enable the record again. There is no need for confirmation to enable a record.

The confirmations can be turned off, this is configurable via TSConfig options.alertPopups.

There are also options to configure the editPanel for custom records, e.g. news. As I follow the "pages approach", I don't have an example from this website yet.

The editIcons

Beside editPanel there is also editIcons. While the panel adds a full blown toolbar, the icon is a single icon that allows editing of the record.

The icon not only prevents sorting, adding, deletion, etc. It also allows integrator to fine grain configure which fields to show. An example from this website looks like this:

lib.contentElement = FLUIDTEMPLATE
lib.contentElement {
    stdWrap {
        editIcons = tt_content:
        editIcons {
            beforeLastTag = -1
            iconTitle = Edit specific fields of content element
        }
    }
}

tt_content.text =< lib.contentElement
tt_content.text {
    stdWrap {
        editIcons := appendString(header, header_layout, layout, bodytext)
    }
}

First of all editIcons are enabled for all content elements. I also configure to add the icon before the content element and provide a title. As every content element might have other fields that need to be edited, these are configured on a per content element level. In above example only the following fields are shown and editable for text content elements: header, header_layout, layout, bodytext.

State of the extension

For a very long time the extension was part of TYPO3 core. Since v10 the extension was moved to FriendsOfTYPO3 GitHub account and is available at https://github.com/FriendsOfTYPO3/feedit. The extension is also available as a composer package friendsoftypo3/feedit.

I've invested some hours to make it compatible with current TYPO3 master (v10) and to add two smaller features.

As the extension doesn't need much code and interacts in a clean way with TYPO3, it is very likely to stay for future versions.

I would highly appreciate more love to this hidden gem of TYPO3, which in my opinion improves the editing experience. It allows fast fixes to content and even provide a nice experience when creating new blog posts. All of that without heavy configuration.

This blog post was written using the extension.

Further reading