Hello I have created a module to display a block. I would like to set the block visibity to visible and hidden in the homepage based on a condition.
like this:
edit:
//fetch status from database then check condition
if ($status = 1){
//make block visible
}else{
//hide block
}
I have searched all over the internet and could not find how to make it work.
I have a form that is used to add contents to a database and it has a checkbox to whether make the make the block visible or not.
So I would fetch the status(visible/hidden) of the block from the database and then make the block visible.