Build edit block with user permission
Permalink
Hi,
I've built a couple of sites with c5 (v5.6) and it's really easy and now I am trying to create some new blocks for special functions. I've got the general idea but I can't work out how to access information about the current visitor to the site.
As an example I want to build a new block based on the file download block which allows a download if the visitor is logged in and belongs to a specified group but shows a "You must be registered" message if not logged in. The logic being something like:
I think I could achieve something like this using Advanced Permissions but I'd prefer to stick with Standard Permissions if possible and deal with special cases through code.
Can anyone point me in the right direction to get the user info I need?
Thanks
I've built a couple of sites with c5 (v5.6) and it's really easy and now I am trying to create some new blocks for special functions. I've got the general idea but I can't work out how to access information about the current visitor to the site.
As an example I want to build a new block based on the file download block which allows a download if the visitor is logged in and belongs to a specified group but shows a "You must be registered" message if not logged in. The logic being something like:
I think I could achieve something like this using Advanced Permissions but I'd prefer to stick with Standard Permissions if possible and deal with special cases through code.
Can anyone point me in the right direction to get the user info I need?
Thanks