Front controller

class Nos\Controller_Front

Novius OS front-office controller

Use Nos::main_controller to retrieve its instance and call the static methods.

Methods

static Nos\Controller_Front::getContextUrl
Returns:Absolute URL of the current context.
static Nos\Controller_Front::getPage
Returns:Current Model_Page displayed.
static Nos\Controller_Front::getWysiwygName
Returns:Current wysiwyg ID processed.
static Nos\Controller_Front::getUrl
Returns:Current absolute URL.
static Nos\Controller_Front::getPageUrl
Returns:Relative (to Controller_Front::getContextUrl) URL of the current page.
static Nos\Controller_Front::getEnhancedUrlPath
Returns:
Relative (to Controller_Front::getContextUrl) URL of the current URL enhancer.
False if no current URL enhancer.

Same that Controller_Front::getPageUrl ending with / instead of .html.

static Nos\Controller_Front::getEnhancerUrl
Returns:
Part of the URL processed by the URL enhancer.
False if no current URL enhancer.
static Nos\Controller_Front::setBaseHref($base_href)
Parameters:
  • $base_href (string) – Sets a new <base href=""> for the current HTML output.
static Nos\Controller_Front::setTitle($title, $template = null)
Parameters:
  • $title (string) – Set a new title for the current HTML.
  • $template (string) – If set, use it to calculate the title. Placeholder :title will be replaced by $title.
static Nos\Controller_Front::setMetaDescription($meta_description)
Parameters:
  • $meta_description (string) – Set a meta description for the current HTML output.
static Nos\Controller_Front::setMetaKeywords($meta_keywords)
Parameters:
  • $meta_keywords (string) – Set a meta keywords for the current HTML output.
static Nos\Controller_Front::setMetaRobots($meta_robots)
Parameters:
  • $meta_robots (string) – Set a meta robots for the current HTML output.
static Nos\Controller_Front::addMeta($meta)
Parameters:
  • $meta (string) – A HTML meta tag to add in the current HTML output.
static Nos\Controller_Front::addJavascript($url, $footer = true)
Parameters:
  • $url (string) – URL of a JavaScript library to add in the current HTML output.
  • $footer (boolea) – If true, add script at the end of HTML output. If false, add in the <head>.
static Nos\Controller_Front::addJavascriptInline($js, $footer = true)
Parameters:
  • $url (string) – Javascript code to add in the current HTML output.
  • $footer (boolea) – If true, add script at the end of HTML output. If false, add in the <head>.
static Nos\Controller_Front::addCss($url)
Parameters:
  • $url (string) – URL of a CSS file to add in the current HTML output.
static Nos\Controller_Front::addCssInline($css)
Parameters:
  • $css (string) – CSS code to add in the current HTML output.
static Nos\Controller_Front::isPreview
Returns:Boolean, true if current page is requested in the preview mode.