<![CDATA[ ManagerManager for Revo - Hide templates - My Forums]]> https://forums.modx.com/thread/?thread=45299 <![CDATA[Re: ManagerManager for Revo - Hide templates]]> https://forums.modx.com/thread/45299/managermanager-for-revo---hide-templates?page=3#dis-post-515943 krishnap2w2 Dec 01, 2014, 05:32 AM https://forums.modx.com/thread/45299/managermanager-for-revo---hide-templates?page=3#dis-post-515943 <![CDATA[Re: ManagerManager for Revo - Hide templates]]> https://forums.modx.com/thread/45299/managermanager-for-revo---hide-templates?page=3#dis-post-466999
]]>
BobRay May 22, 2013, 05:04 PM https://forums.modx.com/thread/45299/managermanager-for-revo---hide-templates?page=3#dis-post-466999
<![CDATA[Re: ManagerManager for Revo - Hide templates]]> https://forums.modx.com/thread/45299/managermanager-for-revo---hide-templates?page=3#dis-post-466940 Quote from: fouk at Jun 30, 2011, 12:36 AM
Quote from: BobRay at May 19, 2011, 04:56 AM



Put the templates you want to hide into a category.

Then go to Security -> Access Controls -> User Groups tab.

Right-click on the Administrator group and select update.

On the Element Category Access tab, create a new ACL entry specifying that category, a context of 'mgr,' a minimum role of admin Super User, and a policy of 'element.'

Save.

Flush Permissions

Flush All Sessions


This successfully hides the templates from the 'Uses Template' drop-down menu, but it also hides the Template Variables, so their values can only be edited from the super user ... which is not so good shocked




Two years later and your advice still helped me. I managed to follow this tutorial:
http://bmv-interactive.com/home/modx-acl-tutorial.html

and coupled with your instructions, I managed to customize the Manager for the site editors!]]>
insightdesign May 22, 2013, 04:01 AM https://forums.modx.com/thread/45299/managermanager-for-revo---hide-templates?page=3#dis-post-466940
<![CDATA[Re: ManagerManager for Revo - Hide templates]]> https://forums.modx.com/thread/45299/managermanager-for-revo---hide-templates?page=3#dis-post-456474 ]]> BobRay Feb 25, 2013, 02:03 AM https://forums.modx.com/thread/45299/managermanager-for-revo---hide-templates?page=3#dis-post-456474 <![CDATA[Re: ManagerManager for Revo - Hide templates]]> https://forums.modx.com/thread/45299/managermanager-for-revo---hide-templates?page=3#dis-post-456470
and have this listener in your custom-TV:

 
           ,listeners: {
                'select': {fn: this.templateWarning,scope: this}
} 


you will also need a customized templateWarning - function in your custom-TV]]>
Bruno17 Feb 25, 2013, 01:54 AM https://forums.modx.com/thread/45299/managermanager-for-revo---hide-templates?page=3#dis-post-456470
<![CDATA[Re: ManagerManager for Revo - Hide templates]]> https://forums.modx.com/thread/45299/managermanager-for-revo---hide-templates?page=2#dis-post-456468 To hide the empty template selector I would need to add it to the admin element category. But the empty template, template 0, does not show in the list to do so.

Hmmmmm]]>
eric.swd Feb 25, 2013, 01:47 AM https://forums.modx.com/thread/45299/managermanager-for-revo---hide-templates?page=2#dis-post-456468
<![CDATA[Re: ManagerManager for Revo - Hide templates]]> https://forums.modx.com/thread/45299/managermanager-for-revo---hide-templates?page=2#dis-post-456467

BTW, I looked at that panel in Firebug and the empty option is a div and is the first child of the div with this ID (at least in my version of MODX):

id="ext-gen522"


I tried the code below in a plugin attached to OnDocFormPrerender, but it doesn't work. I blame ExtJS. It appears that the drop-down doesn't exist until you click on it. I tried registering an onClick event for the parent, but still no luck, so it's obviously nastier than I thought. I give up. wink

JS is not my string suit, so maybe someone else can suggest a way.

$js = '<script type="text/javascript">
(function(){ 
    var container = document.getElementById("ext-gen522");
    var field = container.firstChild;
    if (field.indexOf("empty") != -1 ) {
        field.style.visibility = "hidden";   
    }
}());
</script>'

$modx->regClientStartupScript($js);
]]>
BobRay Feb 25, 2013, 01:47 AM https://forums.modx.com/thread/45299/managermanager-for-revo---hide-templates?page=2#dis-post-456467
<![CDATA[Re: ManagerManager for Revo - Hide templates]]> https://forums.modx.com/thread/45299/managermanager-for-revo---hide-templates?page=2#dis-post-456466
Worked out the selector hiding part on selected resources.]]>
eric.swd Feb 25, 2013, 01:31 AM https://forums.modx.com/thread/45299/managermanager-for-revo---hide-templates?page=2#dis-post-456466
<![CDATA[Re: ManagerManager for Revo - Hide templates]]> https://forums.modx.com/thread/45299/managermanager-for-revo---hide-templates?page=2#dis-post-456465
That said, there was no way to manipulate the forms in the back-end (on the server) because the forms were built field by field with mixed HTML and inline PHP. Revo forms, however, are built all in PHP and are available in full for meddling within a plugin. So you could write your own plugin to check the user's group and remove the field from the form for such users. The built-in Form Customization just provides a (relatively) convenient UI for it.]]>
sottwell Feb 25, 2013, 01:18 AM https://forums.modx.com/thread/45299/managermanager-for-revo---hide-templates?page=2#dis-post-456465
<![CDATA[Re: ManagerManager for Revo - Hide templates]]> https://forums.modx.com/thread/45299/managermanager-for-revo---hide-templates?page=2#dis-post-456461
OK one more question. Is the answer in your book!?]]>
eric.swd Feb 25, 2013, 12:55 AM https://forums.modx.com/thread/45299/managermanager-for-revo---hide-templates?page=2#dis-post-456461