Skip to content

API Reference

The template engine instance is available as $this->nxp in template context.

Frequently used methods

  • getLangCode() - full BCP47 language tag (e.g. en-GB)
  • isHome() - whether current page is homepage
  • bodyClasses() - generated context-aware body class list
  • addCSS() / addJS() - register additional assets
  • render() - render custom FileLayout layouts
  • generateFavicons() / generateOpenGraph() / generateFonts()
  • outputSystemMessages() - render Joomla system messages

Example usage

php
<?php
defined('_JEXEC') or die;

$nxp = $this->nxp;
echo $nxp->render('hero', [
  'title' => 'Welcome',
]);

Notes

  • Use only validated local asset paths unless intentionally loading external URLs.
  • Keep custom layout input escaped by context (HTML/attribute/URL).