I want to add a conditional in front of the Create New Item button that checks to see if the user already has an Item created. Is there a "hasItems" tag for the user that I can use for that?
The xf_user table has a field named 'showcase_count'. That field stores the number of Showcase Items that the user has (Visible, not Moderated or Soft Deleted).
$visitor.showcase_count = the number of visible Showcase Items the viewing user has.
btw, if your reasoning is to limit people to only creating x amount of items, there is a Showcase Permission for that named 'Max items can create (per user)'.
I'll give that a shot. The idea is to display the button to people who don't have items created. If they do the button won't display, or it will take up less real estate.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.