feel free to keep it strictly simple...

Display FE Message

Since L* 7.4.0 the L*frontend (-class) holds a static method to display any messages/warnings/whatever in the frontend.

This documentation may not be accurate

To customize the layout you can place a copy of
     ~/upload/templates/lepsem/backend/backend/message.lte
inside the root of the frontend-template e.g.:
    ~/upload/templates/your_frontend-template/frontend/core/message.lte

You can use other names as "message.lte" (default) inside the method; see line 16 below the following.

Params - call

  1. /**
  2. * @param string $sType The css-'class' type off the message: success, error, positiv, whatever.
  3. * @param array|string $sMessage Any Message array | string.
  4. * @param string $sRedirect Any redirect (URL), mostly the current page itself.
  5. * @param int $iRedirectTime The redirect time. Keep in mind that this are js-milliseconds!
  6. * 3000 are 3 sec! A value like -1 means no timeout; stand still.
  7. * @param string $sTemplateName Any name of the .lte file in folder DEFAULT_TEMPLATE."/frontend/core/"
  8. * @param bool $bDirectOutput Prompt the message direct (echo),
  9. * false returns the generated source. Default is true == prompt!
  10. *
  11. */
  12. public static function displayFEMessage(
  13. string $sType ="success",
  14. array|string $aMessage=[],
  15. string $sRedirect="",
  16. int $iRedirectTime = -1,
  17. string $sTemplateName = "message.lte",
  18. bool $bDirectOutput = true
  19. );
last edit: 09. Sep 2025 CEST 13:51:19

Example given

LEPTON_frontend::displayFEMessage

Display a (separate) message in the frontend.

// example given $aMessage = ['header','text1'] LEPTON_frontend::displayFEMessage( "success", // Type, e.g. 'error', 'warning', 'notice' ... $aMessage, // Array within the text LEPTON_URL."/page/start.php", // redirect url 5000, // in milliseconds (js)! 5000 means 5 sec.; -1 means: stand still "message_custom.lte" // A custom *.lte file );
last edit: 07. Apr 2025 CEST 21:00:50

There is also a backend rellated method inside the LEPTON_admin class with the same params as above to handle situations without calling "print_footer" or "print_error":

LEPTON_admin::displayMessage

Example given

  1. echo LEPTON_admin::displayMessage(
  2. "success",
  3. [
  4. $oAUTOGAL->language['SETTINGS_SAVED'],
  5. $oAUTOGAL->language['SETTINGS_SAVED_2']
  6. ],
  7. ADMIN_URL.'/pages/modify.php?page_id='.$page_id,
  8. 3000, // in millisec!
  9. "message_autogallery_backend.lte", // inside the template dir of this module!
  10. false
  11. );
last edit: 15. Sep 2025 CEST 12:36:45