Class LoadRedirectPathDirective

java.lang.Object
ch.tocco.nice2.optional.cms.impl.directives.LoadRedirectPathDirective
All Implemented Interfaces:
Nice2TemplateDirective, freemarker.template.TemplateDirectiveModel, freemarker.template.TemplateModel

public class LoadRedirectPathDirective extends Object implements Nice2TemplateDirective
Load the path for the redirect (in privileged mode). Arguments: - entity: The base entity - name: The name of the variable where the result is stored - fields: Comma separated list of fields to look up the path in - relations: Comma separated list of relations to a ContentTreeNode entity Presedence: 1. The first field value that is set, will be returned 2. If no field value is set, the first relation that is set will be taken. Usage examples: In redirect widget: [@loadRedirectPath entity=singleBase name="location" fields="location" relations="relPage"/] In login widget: [@loadRedirectPath entity=singleBase name="location" relations="relPage"/]
  • Constructor Details

  • Method Details

    • execute

      public void execute(freemarker.core.Environment env, Map params, freemarker.template.TemplateModel[] loopVars, freemarker.template.TemplateDirectiveBody body) throws freemarker.template.TemplateException, IOException
      Specified by:
      execute in interface freemarker.template.TemplateDirectiveModel
      Throws:
      freemarker.template.TemplateException
      IOException