Tell us what you are trying to do?
I am trying to display the url form a parent CPT, by conditional output if the field is not empty
Is there any documentation that you are following?
Is there a similar example that we can see?
I have to kind of singin information. One which is stored in the CPT I am displaying (Veranstaltung/event) and on who is stored in the parent CPT (Veranstalter/organizer)
I can display the url-anmeldung-veranstalter with a conditional output that checks if the field is empty:
[wpv-conditional if="( NOT(empty($(wpcf-url-anmeldung-veranstalter))) )"]
But i dont get it if i want to display the singin information from the parent CPT.
neigther
[wpv-conditional if="( '[types field="url-anmeldung-veranstalter" item="@einzelveranstalter-veranstaltung.parent"]' eq '' )" evaluate="false"]
nore
[wpv-conditional if="( NOT(empty($(wpcf-url-anmeldung-veranstaltung))) )"]
work
The format the condition should be in to test the custom field from the parent should be like so:
[wpv-conditional if="( NOT ( empty( $(wpcf-url-anmeldung-veranstaltung).item(@einzelveranstalter-veranstaltung.parent) ) ) )"]
(The block editor is much improved and lets you insert such conditions using the UI. You can then see what the condition itself looks like with the advanced editor.)
ja sry missed the ".item(@einzelveranstalter-veranstaltung.parent)"
The problem with the Add Conditional Output insight the Text and Fields Block is that it has no Empty value like when using the Conditional Block.
Neighter I can choose a parent relation, just "from the current post"
So the best solution seems to be:
1. adding a conditional-block
2. setting the conditions
3. edit as html
4. copy conditonal tag
5. paste it in the html editor of the Text and Fields Block.
Is it that what you meant with your last sentence?
From your question I understood that you weren't using a conditional block and that you were using the legacy interface. You are using Blocks, but the Fields and Text block displays the legacy interface for conditions, which is less complete and often needs editing. If you don't know the format required (not something you are likely to carry around in your head), then copying and pasting it from a Conditional Block that you later dispose of is likely the best solution.