$CMS_VALUE()$ in Executable nachbauen
Author: dmihajluk
Publication Date: 5/7/2015 8:46
Hallo,
ich habe eine Frage und zwar, wie kann ich einer Executable die Funktion $CMS_VALUE()$ nachbauen?
Anwendungsfall:
ich möchte Eingabekomponenten wie z.B. CMS_INPUT_DOM oder CMS_INPUT_LINK innerhalb
einer Executable rendern.
Die FormFields bzw. die Objekt habe ich bereits in der Executable:
@Override
public Object execute(Map<String, Object> executionContext, Writer stdOut, Writer stdErr) throws ExecutionException {
SiteProduction siteProduction = (SiteProduction) executionContext.get("context");
Section<?> section = siteProduction.getSection();
FormData formData = section.getFormData();
Language language = siteProduction.getLanguage();
FormField field = formData.get(lang, "link_field_name");
Link link = (Link) field.get();
}
Wie bringe ich diese jetzt zum Rendern?
Vielen Dank im Voraus für die Tipps!
Tags: api, executable, fs5.1, generation, generierung, render
-
Author: Peter_Jodeleit - 5/7/2015 15:49
Sollte in etwa so funktionieren:
siteProduction.getContext().setVariableValue("x", <field>);
siteProduction.print(siteProduction.parse("$CMS_VALUE(x)$"));0
Please sign in to leave a comment.
Comments
1 comment