reger
Returning Observer

Editing project settings in content creator

Jump to solution

Hi,
is it possible to edit the project setting in content creator? Setting of a preview page was not successful. In my memory it worked in older versions (but long long time ago) but maybe I'm wrong.
In this question from 2016 the answer was negative.: Solved: ContentCreator // Pflege von Elemente aus Projekte... | Crownpeak Community
Does anyone know newer options? 
Thanks in advance
Gabriele Reger

0 Kudos
1 Solution

Accepted Solutions

Hi,

the only option to edit project settings in content creator is to use an https://docs.e-spirit.com/odfs/dev/de/espirit/firstspirit/ui/operations/ShowFormDialogOperation.html in combination with the projects settings form data 😉

br, Hendrik

View solution in original post

4 Replies
sense
Elite Observer

From what I know this is still not possible in the ContentCreator.
I also did not find a feature notice in any of the changelogs.

0 Kudos

Hi,

the only option to edit project settings in content creator is to use an https://docs.e-spirit.com/odfs/dev/de/espirit/firstspirit/ui/operations/ShowFormDialogOperation.html in combination with the projects settings form data 😉

br, Hendrik

Maybe provide a simple beanshell implementation if you have the time 😁

0 Kudos
hoebbel
Crownpeak employee

In Beanshell you could solve it like this:

import de.espirit.firstspirit.access.store.Store;
import de.espirit.firstspirit.agency.OperationAgent;
import de.espirit.firstspirit.agency.StoreAgent;
import de.espirit.firstspirit.ui.operations.OpenElementDataFormOperation;
import de.espirit.firstspirit.webedit.WebeditUiAgent;


globalstore = context.requireSpecialist(StoreAgent.TYPE).getStore(Store.Type.GLOBALSTORE);
projectProperties = globalstore.getProjectProperties();
operationAgent = context.requireSpecialist(OperationAgent.TYPE);
openElementDataFormOperation = operationAgent.getOperation(OpenElementDataFormOperation.TYPE);
openElementDataFormOperation.setOpenEditable(projectProperties.getPermission().canChange());
webeditUiAgent = context.requireSpecialist(WebeditUiAgent.TYPE);
language = webeditUiAgent.getPreviewLanguage();
if (language == null) {
	language = context.getProject().getMasterLanguage();
}
openElementDataFormOperation.setLanguage(language);
openElementDataFormOperation.perform(projectProperties);

best regards
Holger