I am trying to hide a list item in Yii CList
view based on a visibility condition.
Based on an id
that I get from the list , I need to check whether a condition exists and display that item only if that condition is true.
I have a request_tbl
and ibnvite_tbl
. Request table contains all requests in the system. It contains a field named invite_type
. If invite_type is 3 , there will be an insertion in invite table with comma separated values of invited users with corresponding request_id
.
My requirement is:
On a user login, based on my list view, if invite_type is 3 need to display the list items from request table for the logged in user_id
. if the invite_type not equal to 3 we can list the items without checking,
For me only white space is showing in case there is no user_id in invite table when the invite_type is 3. How can I display the items?.
If more details are required , I will add it.