Reserved Words

Reserved words in Genix are special shortcodes with predefined behavior. Unlike user-defined shortcodes or widgets, these words are interpreted directly by the parser and control how a page is rendered within a template. Because of their unique role, reserved words cannot be redefined or replaced.

HEAD

The [HEAD /] shortcode is used to pass information from a page to its template. This can include attribute variables such as the bodyclass, which determine how the template is styled, as well as instructions for inserting additional scripts or styles into the of the final HTML output. The HEAD shortcode is also where you can specify which template file the page should use, making it an essential element for controlling page-level customization.

CONTENT

The [CONTENT]...[/CONTENT] shortcode represents the body of a page. Everything contained within this enclosing shortcode is treated as the primary text and layout for the page. This section may include plain text, nested shortcodes, or widgets, and it is ultimately flattened into the output that the template renders. In other words, CONTENT acts as the insertion point for the actual page material.

Escape Character

In Genix, the character allows you to escape the following character. For example, if you wish to use the open bracket as text and not a shortcode, you can use the escape character.

<p>[TEXT]<p>

The output will be <p>[TEXT]</p>. This can also be used inside of attributes:

[HEAD title="[1.0] "Hello" World"/]

In this example, the value of title is [1.0] "Hello" World.

Built-In Variables

Genix provides a set of built-in page variables that can be accessed with standard shortcode syntax. For example, the shortcode [FILE_PATH] returns the relative URL of the current page. If the file is renamed or moved to a different directory, the variable automatically updates during compilation, ensuring your links stay accurate without manual changes.

Syntax: [FILE_PATH]

Example Code

In this example, the HEAD shortcode uses the template attribute to specify which template to use, a body class, and a page title to the rendering engine. The CONTENT shortcode contains the actual page material, which will be injected into the template at the designated content slot.

Example Page:

[HEAD 
  template="default" 
  bodyclass="about-page" 
  title="About Genix" 
/]
[CONTENT]
# Page Specific Content
[/CONTENT]

Example Default Template:

<html>
  <head>
    <title>[TITLE]</title>
  </head>
  <body class="[BODYCLASS]">
    [CONTENT]
  </body>
</html>

Static File:

<html>
  <head>
    <title>About Genix</title>
  </head>
  <body class="about-page">
    
# Page Specific Content

  </body>
</html>
Scroll To Top