Home › Toolset Professional Support › [Resolved] View hide lable
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
Tagged: Content Templates, Views, Views API, Views plugin
Related documentation:
This topic contains 2 replies, has 2 voices.
Last updated by Ljuba 6 years, 4 months ago.
Tell us what you are trying to do?
I created the View with content of 3 Content Templates. I need Content Templates separately as they will be used in several different situations and Views. All Content Templates are set with conditional logic to be hidden if fields are empty.
View contain Header (text). My issue is that I don't have idea how to hide the Header title if ANY OF 3 Content Templates will be shown on page. I know how to use empty function with fields and I know how to do it if View will be done directly by fields, but here is situation of 'assembled View' by different Content Templates.
So, if ONLY WAY is to 'wrap' it conditionally by naming all fields from all 3 templates, I know how to do it. My question is is it the way to use empty function for 'empty template'?
The problem is that in your Content Template you won't just have ShortCodes wrapped in conditionals, but probably lots of other content that is either displayed if it's present (field exists) or, even if it does not, like for example default HTML, etc.
Moreover, the status of "empty" is set on the database, and that Content Template is hence NOT empty ever, since you populated it (even conditional ShortCodes are just "content" of that Content Template, as its stored as a simple post in the database).
So, you could not check if the actual template is empty, since that is never empty.
What you'd need to do is check upon something that can be empty, hence the only here is the actual direct field.
Does this make sense?
==> Because even a single "Dot" in a Content Template is actual "content" you cannot rely on it's empty/not empty state.
Thanks for clear answer. I guess the same, just needed confirmation.