Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > Editable Text FCKEditor Toolbar set by Roles View modes: 
User avatar
Member
Member
Yalın - 5/12/2010 8:35:25 AM
   
Editable Text FCKEditor Toolbar set by Roles
How can we get the Editable Text Web Part to display a different toolbar set based on user roles? such as...

CMSEditors - Basic
CMSDeskAdmin - Advanced

Thank you.

User avatar
Member
Member
Yalın - 5/12/2010 9:23:20 AM
   
RE:Editable Text FCKEditor Toolbar set by Roles
I think I may be able to achieve this using the in-place macros but I need some help.

Can you please provide me an example on how If then else statements work in the in-place macros?

Here's what I'm trying to accomplish but with incorrect syntax

Under...

Editable Text Webpart (Properties) > [Behaviour] > HTML editor toolbar set > [Macro Value]


if ({%cmscontext.currentuser.userisglobaladministrator%})
ToolbarWithSource //The value I want the HTML editor toolbar to have if user is admin
else
ToolbarBasic //The value I want the HTML editor toolbar to have if user is an editor

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 5/17/2010 2:17:54 AM
   
RE:Editable Text FCKEditor Toolbar set by Roles
Hi,

Macros are basically special strings, not programming language, so it is not possible to use conditions in macros.

In your case it would be easier to set this particular property of the editable text web part dynamically in the code behind, where you can easily check from context the current user and according to the role, you will set the propertyt oolbar as you need.

Best regards,
Juraj Ondrus

User avatar
Member
Member
Yalın - 5/18/2010 8:54:28 AM
   
RE:Editable Text FCKEditor Toolbar set by Roles
I also tried another method unsuccessfully,

I assigned my version of the full toolbar but checked off accessible toolbar items for the roles that should have less through...

CMS Desk > Administration > UI Personalization > Editor Tag > [Select Role] > [Uncheck Parts]

Why doesn't this method work?

User avatar
Kentico Developer
Kentico Developer
kentico_helenag - 5/18/2010 9:16:01 AM
   
RE:Editable Text FCKEditor Toolbar set by Roles
Hello,


I tested it on my web site and it works correctly. I cannot see the buttons which I unchecked for testing role.

Please check:
1. If the testing user does not have any other role which would allow him to see more buttons of WYSIWYG Editor.

2. If you sign out and log in to see the changes.

3. The testing user is not a Global administrator.


Best regards,
Helena Grulichova