In package com.eden.orchid.api.compilers

public abstract class TemplateTag extends Object implements OptionsHolder

since: v1.0.0 public abstract

Template Tags are a convenient way to create complex structures from simple markup that may be used anywhere. Tags should be wrapped by the main template language, and are expected to provide a template in templates/tags/ with a filename that matches the name of the TemplateTag. This template is what is rendered when the tag is parsed by the main template language, and any Options may be set with the Tag class and are available within the template. All options can be set as named arguments, but if you want to allow certain parameters to be specified as sequential parameters, you may pass the name of those parameters in the parameters() method.


OrchidPage page
Field Annotations:


TemplateTag(String name, TemplateTag.Type type, boolean rendersContent) public

Initialize the Tag with the name which it should be called with in the template. The actual implementation of a Tag should have a single constructor annotated with {@link javax.inject.Inject }.

  • String name

    the name which to call this Tag
  • TemplateTag.Type type

    the type of tag this is. A Simple tag is just a simple self-closing tag, a Content tag wraps a single content body, a Tabbed tag wraps multiple content bodies and references them by name
  • rendersContent

    true if this tag renders content, false if it just produces side-effects with no output


String parameters() abstract public

The sequential parameters of this function

void onRender() public

String getContent() public

String getContent(String name) public

  • String name
void setContent(TemplateTag.Tab content) public

void setContent(String name, TemplateTag.Tab content) public

TemplateTag.Tab getNewTab(String key, String content) public

  • String key
  • String content
List<E> getTabs() public