-
1) In GB pro query builder, using a CPT, I can’t see any option to add a label in front of any dynamic fields. e.g. the front end should display label:value (Name:Joe Blogs). How do I add a label?
2) The CPT has optional image fields. When setting dynamic image on the template, I can’t see any option to set a fallback image shoud the user not upload an image. Is there a way to set this?
-
Fernando
Hi Stuart,
1. You can add another Headline Block for the Label. You just need to set the display of this static Headline and the dynamic Headline to
inline
. You’ll also need to place them in one Container Block.This should do the job.
Reference: https://docs.generateblocks.com/article/layout-options-overview/#inline
2. Fallback Images are only possible with a Container Block – setting the Image as a Background Image.
An alternative would be to add another static Image Block for the “fallback”, and make it appear or disappear depending on whether the custom Image field is populated or not.
Let us know which you prefer.
-
stuart
Thanks. In 2) the second option would be my preferred – do you have an example of this or a walkthrough?
My CPT has 3 images, 1 required and 2 optional.
With the preferred method, although the image is set to disappear, would there not still be a load of stuff left in the code?
Ican’t really tell until I see it working.
-
Hi there,
see my reply here for loading a fallback image in a GB Image Block:
- You must be logged in to reply to this topic.