Skip Navigation

[Resuelto] Can I filter a DIVI module placed on a page according to an access condition?

Este hilo está resuelto. Aquí tiene una descripción del problema y la solución.

Problem: Can I use Access to manage the display of a DIVI module?

Solution: At this time we do not provide Access control at the Divi Module level. Please find the link here with information about the Types Access API and how it can be used by third-party plugins to restrict access. Implementing this API for Divi Modules would require custom code.

Relevant Documentation: https://toolset.com/documentation/user-guides/letting-access-control-privileges-for-other-plugins/

This support ticket is created hace 7 años. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Hoy no hay técnicos de soporte disponibles en el foro Juego de herramientas. Siéntase libre de enviar sus tiques y les daremos trámite tan pronto como estemos disponibles en línea. Gracias por su comprensión.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

Este tema contiene 7 respuestas, tiene 2 mensajes.

Última actualización por Christian Cox hace 7 años.

Asistido por: Christian Cox.

Autor
Mensajes
#587288
2017-11-07_19-31-28.jpg

Can I filter a DIVI module placed on a page according to an access condition?
Not the content of the module, but the entire module.

In the following screenshot I want the DIVI row module to be shown in the frontend or not according to a Toolset Access condition.

Thanks for your help.

Best regards,
Francisco R.

#587341
Screen Shot 2017-11-07 at 5.04.25 PM.png

That would be a great feature, but those modules are rendered by Divi and Toolset conditionals cannot be applied at the module level. You could possibly use CSS classes to show and hide entire modules based on some combination of CSS classes. In the module settings, there is a space to insert CSS classes (see the screenshot). You can manage a combination of CSS classes with Access Control shortcodes applied to wrapping HTML elements, but that won't prevent the module from being rendered in the page source. The only way to completely prevent the module's content from appearing in the page markup is to use inline Access Control shortcodes. If you combine those with the CSS class combination approach, you can effectively hide the content and its wrapping container.

<!-- your custom code wrapper -->
<div class="[toolset_access role='Guest' operator='allow']access-wrapper[/toolset_access]">

  <!-- module content rendered by Divi -->
  <div class="hide-with-access">
    ...your module content here
  </div>
</div>
.access-wrapper .hide-with-access {
  display: none;
}
#587459

I do not understand this.
Even if this is done, the content of the module is rendered in the HTML even if it is hidden with a CSS.

#587630

Right, it's still required to use the inline Access Control shortcodes in the content of the module itself to suppress the content. The CSS approach is only to remove the wrapping container(s) from display, so you don't see a blank module space in the front-end. If you'd like, I can submit your idea as a feature request to our development team. They'll consider it and I can let you know if they decide to implement Access control at the module level for Divi.

#587692

Yes. Of course. Discuss with the Toolset development team.
This feature would be really powerful for Toolset Access and would make life much easier for Toolset users.
Tell me something when you know your conclusions.
Thanks for your help Christian.

#587715

Okay sure, I've submitted the request to my 2nd tier support team, who will evaluate it and pass it along to our developers or reject it. I'll let you know what I find out. The protocol here is to close out the ticket, and I will still be able to send comments to you with updates.

#587724

Ok. Thanks Christian.

#588914

Hi, at this time we have decided not to implement Access control at the Divi Module level. I will let you know if that decision changes for any reason. For now, I can share this information about our Types Access API and how it can be used by third-party plugins to restrict access:
https://toolset.com/documentation/user-guides/letting-access-control-privileges-for-other-plugins/
Implementing this API for Divi Modules would require custom code.