It helps a lot, because I’m starting to understand more about html embed and a little bit of code.
The only thing is that I don’t quite get the result that I want.
Let me explain to give you a better understanding of what I want to achieve…
I have a CMS collection that is populated via a form on protected page, the idea is that the people that has the password for that protected page send their blog posts to the blog post CMS collection. As part of the form submission I added the uploadcare widget so the members can upload their image of those blog posts.
When they fill the form and Zapier makes their magic I get a CMS item with the information they sent and in that information comes a link to the image the uploaded to uploadcare.
In the blog post template page I have a div containing the image and I want to use the link for the image that they sent through uploadcare.
So you’re going to want to add a DYNAMIC EMBED instead of just embedding static code.
To do this, drag a Embedded block into the Div on your Blog Post Template Page.
Highlight the LINK URL you put inside the embedded block. Click +field in the upper right-hand corner of the embedded block, it should be a purple hyperlink.
Select a dynamic element that you would want to replace that URL with. I am guessing your Uploadcare link is the item labeled “Image Link”
For some reason I thought that I tried that but now that I did it again it works just for one thing.
The image takes the dimensions from itself. I tried giving the embed element a class and using a fixed height but its not working, plus I need the image to fill the div as a cover background not fixed. I know that is a matter of playing with the code you just gave me before but every time a add that code for some reason put the main logo image in top of everything.
I tried giving the embed element a class and using a fixed height but its not working, plus I need the image to fill the div as a cover background not fixed. I know that is a matter of playing with the code you just gave me before but every time a add that code for some reason put the main logo image in top of everything.
To style the Image inside of your embed element your going to want to use custom code, not by visually editing the styles of the embedded block
Here is another way to do it as well:
Instead of placing an Image inside of the Div by using an embedded block, like you are now, and then styling that image using some CSS to fill the Div… you could also write a line of code to simply select the class of the Div you want to fill with the image as a background, and assign the image or dynamic field (in this case) as the background Img for the Div. Then style the background-image as needed.
Well make sure you have image links in the “image link” field inside your cms or it’s not going to work. Right now it’s just empty. When you are on a template page, from the top left of the designer there is a drop down where you can switch through your collection and select a blog. Use this to navigate to a blog post that contains an image link in the image field.
Then you can test if it works. Please let me know if that helps!
Thanks @Scott_Van_Zandt I’m aware of those kind of things, I have just one blog post that has a link and I’ve testing that specific one and like I said it doesn’t work.
The only blog post that has a link is a post called “Prueba de fuego”
The thing that I would like to know is why if I use this code:
Im doing something similar, where we are pulling Instagram images from Zapier and adding the image into a HTML Embed
However with the img src command, I cannot get the image to cover fill the div I have placed it inside.
I have so far managed to get it so it either stretches to the dimensions which looks awful, or it leaves empty space in the frame when going down the browser sizes.
What would be the Custom code to use in order to pull in the Image URL as a background image and ‘cover’ fill the div I have placed it in? Currently the Div i have placed it in has no styling and is only a ‘Block element’
I have spent a fair of time playing with it using various snippits I found online before eventually waving the white flag lol. My coding knowledge isn’t great enough to understand the short hand stuff alot of people have posted elsewhere.
Hi Aaron, no worries I have attached the screenshot of the custom code I used to style the HTML embed, pulling in the image I wanted as a background image, which covers the div block it is inside of