Zum Inhalt springen

Access-protected areas in the frontend

System extension: felogin

Introduction

A core function of TYPO3 is the ability to display content only for registered users in the frontend. Pages, content elements or even data records from extensions (e.g. news) can only be visible to certain user groups.

In the following video tutorials, we will show you how to create user groups and users, how to add a login form to your website and how to release pages, content elements and data records from extensions for logged-in users only.

Create user groups and users

Create a registration form

In this video, we show you how to create a login form with the felogin system extension. You will also see how to configure redirects after a successful login.

Restrict access for pages and content elements

Not only entire pages can only be activated for registered users, but also individual content elements or data records from extensions, for example news.

Rename the login page after logging in

After successfully logging in, it would be nice if the login page was no longer called Login but Logout, for example.

There are several ways to achieve this. In this video we show one way using TypoScript.

The following code example is used in the video.

You must of course adapt the TypoScript object path to your TypoScript!

## Rename login page after login
## The TypoScript object path lib.menu_horizontal.2 
## must be adapted to the respective TypoScript for the navigation 
## must be adapted!
[loginUser = *]
lib.menu_horizontal.2.NO.stdWrap.override.cObject = TEXT
lib.menu_horizontal.2.NO.stdWrap.override.cObject {
      field = subtitle
      if.value.field = uid
      ## ID of the login page
      if.equals = 31
    }
 
lib.menu_horizontal.2.CUR.stdWrap.override.cObject < lib.menu_horizontal.2.NO.stdWrap.override.cObject
[global]

Documentation of the extension

Further information and explanations of the individual TypoScript configuration options can of course be found in the official documentation of the felogin extension.

This page contains automatically translated content.

Updated: 17.07.2024