Ephox config file per Community Role / Workflow Role

How do I specify a specific config file for Ephox dependant on the users Community Role and/or Workflow Role

I don’t think it’s possible. You could have specific fields that are only visible for certain roles, or certain content types that are not available for everyone, and then apply custom config files to certain fields. But I don’t think you can specify that Admins can do things with the Callout or Body field of the Generic content type that Authors can’t. I’d like to be proved wrong, though.

Hi Dan

You will need to copy the sys_EditLive control from the RXROOT/sys_resources/stylesheets/sys_templates.xsl to RXROOT/rx_resources/stylesheets/rx_templates.xsl.

Then use the following code to

<xsl:variable name="config_src_url">
        <xsl:when test="/ContentEditor/UserStatus/Roles/Role='RichTextFullEditor'">
        	<xsl:value-of select="'../rx_resources/ephox/elj_config_admin.xml'"/>
				<xsl:when test="ParamList/Param[@name='config_src_url']">
					<xsl:value-of select="ParamList/Param[@name='config_src_url']"/>
					<xsl:value-of select="document('')/*/psxctl:ControlMeta[@name='sys_EditLive']/psxctl:ParamList/psxctl:Param[@name='config_src_url']/psxctl:DefaultValue"/>

In this example members of the RichTextFullEditor role can do more by using a different config file.


James you are a star

Thanks for this.

So do I copy everything between

<psxctl:ControlMeta name="sys_EditLive" dimension="single" choiceset="none"> and </psxctl:ControlMeta> 

and then just use your specific code for the config parameter or should I copy over the entire list of variables too?


You can utilize an XML Server application to select different configuration files based on role as well. Percussion gave a webinar on this topic a couple of months ago.

1 - Generate the different ephox config files you want, be sure those work independently of switching based on role
2 - Generate an XML application. This app does very little, just accepts the rolename and associates it with a config file

  • create the query resource name (i.e. role_config). Add the sys_xdFiletoTree post exit. the value will be the path to ONE config i.e. rx_resources/ephox/elj_cutdown_config.xml
  • associate an XSL stylesheet to process this config
  • On the Request properties of the query resource, Add Page selection parameters, this is how to select the query resource by role:
    – variable: PSXUserContext/Roles/RoleNameInClause
    – operator: LIKE
    – value: %Author% (or other role name)
    3 - For each different configuration file, clone the query resource (keep the same name). Edit the value of the post exit to point to the different config file, and edit the request property to select on a different role
    4 - Lastly, on your content editor, associate this XML application with teh config_src_url property of the sys_EditLive control, i.e. …/ephox_role_config/role_config.xml

Ah, I like that. I viewed part of that webinar but I guess I missed more than I thought!

We are interested in this too. Does anyone have an updated link to the Webinar, as the one given is broken?