V2 Global Content Block permissions

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Locked
JamesT
Forum Members
Forum Members
Posts: 175
Joined: Tue Sep 08, 2015 10:41 am

V2 Global Content Block permissions

Post by JamesT »

In CMSMS V1 I was able to give editors permission to edit Global Content Blocks without giving them access to editing the main site template ("Modify Global Content Blocks" permission).

In CMSMS V2 I have the same permissions set. However the facility to edit Global Content Blocks is not present in their control panel unless I give them the "Modify Templates" permission.

Is that right? That I cannot allow editors to edit Global Content Blocks without also giving them permission to edit the full site template?
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: V2 Global Content Block permissions

Post by calguy1000 »

to edit a template you either need "Modify Templates" permission or 'additional editor' access on individual templates.

CMSMS 2.0 makes no distinction between different types of templates.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am

Re: V2 Global Content Block permissions

Post by velden »

Consider reading 'Customer Editable GCB's' (better read it all) in http://docs.cmsmadesimple.org/introducing-cmsms-2-0

It explains how to mimic the previous GCB behavior (it even is more flexible in my opinion).
JamesT
Forum Members
Forum Members
Posts: 175
Joined: Tue Sep 08, 2015 10:41 am

Re: V2 Global Content Block permissions

Post by JamesT »

calguy1000 wrote:to edit a template you either need "Modify Templates" permission or 'additional editor' access on individual templates.
Thanks. The client does not have the "Modify Templates" permission but I have given them "Additional Editors" access on three templates (the former GCB's). However, although Design Manager has now appeared in their control panel, it is completely unpopulated (see attached).

Are there any other steps I need to complete?
Attachments
blank.PNG
JamesT
Forum Members
Forum Members
Posts: 175
Joined: Tue Sep 08, 2015 10:41 am

Re: V2 Global Content Block permissions

Post by JamesT »

velden wrote:It explains how to mimic the previous GCB behavior (it even is more flexible in my opinion).
Thanks. I have managed the replicate the advice on mimicking the old GCB behaviour in 2.0. However my {custom_udt} is displaying as {custom_udt} rather than being executed and displayed.

Is that a limitation of this method?
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am

Re: V2 Global Content Block permissions

Post by velden »

Pass the content to the {eval} smarty tag.
JamesT
Forum Members
Forum Members
Posts: 175
Joined: Tue Sep 08, 2015 10:41 am

Re: V2 Global Content Block permissions

Post by JamesT »

velden wrote:Pass the content to the {eval} smarty tag.
Thanks. I now have the following. "footer" is one of my former, customer-editable, WYSIWYG-enabled GCB's, I'll test with that for now.

Templates:

- Global Content - for creating global content design
- Site Template - includes {page_attr page='global-content' key='footer'}

Design:

- Global Content - to enable creation of content page to hold former GCB content

Content:

- Global Content - holds former GCB content including footer which contains {custom_udt} tag

Where should I place the {eval} tag in order to make {custom_udt} in "footer" expand? And what syntax should it take?
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: V2 Global Content Block permissions

Post by calguy1000 »

Code: Select all

{page_attr page='global-content' key='footer' assign=tmp}{* get the contents of this block into the smarty variable $tmp *}
{eval var=$tmp}{* treat the smarty variable $tmp as a template *}
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
JamesT
Forum Members
Forum Members
Posts: 175
Joined: Tue Sep 08, 2015 10:41 am

Re: V2 Global Content Block permissions

Post by JamesT »

calguy1000 wrote:

Code: Select all

{page_attr page='global-content' key='footer' assign=tmp}{* get the contents of this block into the smarty variable $tmp *}
{eval var=$tmp}{* treat the smarty variable $tmp as a template *}
Thanks, I've got it working now. I miss the old GCB's though.

I didn't manage to allow the customer to edit specific templates without giving them the "Modify Templates" permission (thus allowing them to edit all). In any case unlike the old GCB's, template editing does not seem to allow WYSIWYG which is required for the customer, so the {page_attr} method appears to be the best alternative to GCB's, despite requiring some fiddling to set up.
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am

Re: V2 Global Content Block permissions

Post by velden »

That said, you have way more flexibility now:
  1. By creating more 'GCB' pages you have more controle over permissions
  2. You can use all fancy content block types that are available for page template; think of color picker, file/image selector/upload, page-selector, oneline text input, drop down, checkboxes etc. etc. (some need extra modules)
For example you can create a 'global content block' with multiple input fields; one for streetname, one for telephone number, one for email address etc. Then give only one specific editor permissions to edit that page.
In your other page template(s) you can use those fields to create a full address block, but you can also use one specific field somewhere else, e.g. the phone number for creating a 'call now' or 'send email' button.
JamesT
Forum Members
Forum Members
Posts: 175
Joined: Tue Sep 08, 2015 10:41 am

Re: V2 Global Content Block permissions

Post by JamesT »

Yes, I can see the advantages, but it's awkward to set up and feels more like a workaround than a native solution. There is no way I could have intuitively mimicked the old GCB behaviour without the help of this thread, whereas the old GCB system was a piece of cake.

That being said, if there were a way to assign template editing permissions to certain editors without giving them editing access to all templates (which I couldn't seem to manage) AND WYSIWYG was enabled for editing those templates, then that would work quite nicely.

Not possible?
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: V2 Global Content Block permissions

Post by calguy1000 »

The additional editors thing is fixed in 2.0.1
we will not be adding WYSIWYGS to templates.

It would be relatively simple for a third party developer to create a to allow creation of blocks that are NOT templates, with a wysiwyg.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
JamesT
Forum Members
Forum Members
Posts: 175
Joined: Tue Sep 08, 2015 10:41 am

Re: V2 Global Content Block permissions

Post by JamesT »

Thanks, maybe I'll look out for such a module.

For now, since WYSIWYG is essential for the customer, I will continue with the solution velden highlighted (even when the additional editor issue is fixed).
maetmar
Forum Members
Forum Members
Posts: 36
Joined: Wed Oct 25, 2006 7:48 pm

Re: V2 Global Content Block permissions

Post by maetmar »

I can only confirm that the old behaviour was intuitive, easy and fast.
I miss that.
And it seems that with CMSMS 2.0 the whole templating is in my opinion not very intuitive or easy to understand.
It´s almost like learning a complete new CMS system...
Just wanted to build my first project with 2.0, but stopped it now and will for the time being to it with the latest 1.x release. I alreay spent more time understanding my way around than building the whole site takes with 1.x....
please make sure CMSMS stays "simple" as in the past.
Locked

Return to “CMSMS Core”