Is there a possibility to select what's available for user groups in the Elements type drop-down? I would like to hide some of them to make it easier for editors by showing them only the few they will use.
Many thanks
Is there a possibility to select what's available for user groups in the Elements type drop-down? I would like to hide some of them to make it easier for editors by showing them only the few they will use.
Many thanks
When you set up a user group in TL, you can define "tl_content" under Allowed fields. This determines what article elements are available to the user.
Thanks for your reply, Clemens. However, this is not what I've asked about.
I want to limit the items available in the 'Elements type' drop-down. Lots of them are just not relevant to regular editors.
Hi spirelli,
Sorry, i misunderstood. Try editing the dcaconfig.php file.
This deactivates the "gallery" element for non-admin users.Code:if (!$this->User->isAdmin) { * unset($GLOBALS['TL_CTE']['images']['gallery']); }
C.
Just had time to look at this now...
The sample above works perfectly.
I've tried the same thing with
and that works as expected.Code:unset($GLOBALS['TL_CTE']['images']['image']);
However, I can't figure out any of the other correct variables. I've tried guessing, and ['files']['downloads'] works as well, but is there anywhere where I can look up what the others are? I've tried looking through the files for the backend module, but I'm a bit lost. Thanks for any help.
Temporarily add print_r($GLOBALS['TL_CTE']); to the dcaconfig.php to see the complete list.
Thanks a lot. That's helped
Would be great if one day that could be done in user group settings.
ACTUALLY,
It does what I've intended in the backend, but it breaks my site. The layout is jumbled up, and the Log shows a list of errors:
and so on.[06/07/2009 17:38] Content element class "" (content element "html") does not exist … Delete Show details
[06/07/2009 17:38] Content element class "" (content element "module") does not exist … Delete Show details
[06/07/2009 17:38] Content element class "" (content element "article") does not exist … Delete Show details
[06/07/2009 17:38] Content element class "" (content element "module") does not exist …
It seems as if it doen't like it if the hidden element is used on the page. It seems as if the suggested solution doesn't really work. Just in case, this is what I've inserted into the dcaconfig.php file:
Code:if (!$this->User->isAdmin) { unset($GLOBALS['TL_CTE']['texts']['code']); unset($GLOBALS['TL_CTE']['texts']['list']); unset($GLOBALS['TL_CTE']['texts']['html']); unset($GLOBALS['TL_CTE']['links']['toplink']); unset($GLOBALS['TL_CTE']['includes']['article']); unset($GLOBALS['TL_CTE']['includes']['alias']); unset($GLOBALS['TL_CTE']['includes']['form']); unset($GLOBALS['TL_CTE']['includes']['module']); unset($GLOBALS['TL_CTE']['includes']['teaser']); }
Hi spirelli,
there is also an extension called "ce-access" from andreas which enables you to select or deselect content elements for user groups.
Updated today for TL 2.7.2 use.
---------------------------------------------------
kind regards planepix
Official Contao team member - Official Contao partner
workshop contao conference site 2011
workshop contao conference site 2012
Thanks, I'll give this a try.
Bookmarks