Hi All:
I am trying to wrap my brain around fluid fields, and the documentation isn’t helping me AT ALL. How do I get these to display on my site?
The channel is: Portfolio
The fluid field is: portfolio_popup_image
The sub-fields within the fluid field are: portfolio_caption, portfolio_image, and portfolio_image_alt_text.
Here’s my template sample:
{exp:channel:entries channel="portfolio"}
<!--Portfolio Item-->
{portfolio_popup_image}
<div class="item col-lg-4 col-sm-6 catering">
<a href="http://{portfolio_popup_image:portfolio_image}class=image-link">_ <figure>_ {portfolio_popup_image:portfolio_image}_ <figcaption>_ <h4>{title}</h4>_ {portfolio_popup_image:portfolio_caption}_ </figcaption>_ </figure>_ </a>
</div>
{/portfolio_popup_image}
{/exp:channel:entries}
I have been looking at the instructions and my template for over an hour and can’t get anything to work. Any help would be greatly appreciated.
I think the main reason it’s hard is that a fluid field may not be the best choice for this one.
With a fluid field, each of the sub-fields are generally independent. I may have a heading, a quote, a main image and a thumbnail image subfield. They ‘stand alone’ as it were.
But the subfields here need to be used together to make a link. What I’d be using here is a grid field.
I might put the grid field in a fluid field or I might not- I can have multiple rows so unless I want to weave in say some captions and some quotes and some text blocks among my figures, I’d just go with a grid. If I DID want caption, 2 figures, caption, block of text, figure, quote, 2 figures- then I’d use a fluid field.
Does that help at all? I’d build that figure with a grid with a file column, a text column (for alt text) and another text column (for the caption).
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.