backdrop-contrib / conditional_content_block

A module that let's you provide different content options for different roles.
GNU General Public License v2.0
0 stars 0 forks source link

How to allow user to select which role for show block too #5

Closed stpaultim closed 2 years ago

stpaultim commented 2 years ago

I think the next thing I would like to implement is granting the site editor the ability to choose which role sees which message.

I'll start with the idea that I'm only allowing two options, but once I've got that working I may want to allow the user to create as many messages as possible with as many role conditions as they would like.

Step one, find an example of some code I can copy to get started.

stpaultim commented 2 years ago

I managed to get this working. Not sure if it's the best solution, but it's working. https://forum.backdropcms.org/forum/how-allow-user-select-available-roles-programmatically