Skip Navigation

[Résolu] View hide lable

This support ticket is created Il y a 6 années et 4 mois. There's a good chance that you are reading advice that it now obsolete.

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.

Aucun de nos assistants n'est disponible aujourd'hui sur le forum Jeu d'outils. Veuillez créer un ticket, et nous nous le traiterons dès notre prochaine connexion. Merci de votre compréhension.

Ce sujet contient 2 réponses, a 2 voix.

Dernière mise à jour par Ljuba Il y a 6 années et 4 mois.

Auteur
Publications
#949243

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'?

#950082

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.

#950363

Thanks for clear answer. I guess the same, just needed confirmation.