Blog Sections Open

Showing Protected Output Only to Logged-In Managers with a Tiny Snippet

A tiny snippet can be enough when you need to display helper text or internal output only for logged-in managers.

Sometimes you do not need a full permission system or a complex plugin. You just need to show a piece of output to authenticated managers and hide it from everyone else. A tiny snippet can handle that cleanly.

The core idea

The original pattern checks whether the manager session is validated and returns the provided output only in that case.

<?php
if (isset($_SESSION['mgrValidated'])) {
    return $then;
}
?>

Usage example

[!administration? &then=`Visible only for managers` !]

When this is useful

  • temporary admin notes on the frontend
  • developer-only debug hints during implementation
  • small internal controls on shared staging sites

Important limitation

This is a visibility helper, not a full security layer. Do not use it to protect sensitive business logic or private files. It is only appropriate when the page itself is public and you want a small piece of helper output to stay manager-only.

Newer post

Switching Between Two WebLoginPE Registration Forms with Radio Buttons

How to offer two different WebLoginPE registration flows on one page and switch between them with radio buttons.

Older post

Creating Resources from eForm Submissions with docmanager

How to create a new Evolution CMS resource from an eForm submission by using docmanager and mapping both standard fields and TVs in one flow.