Forum
Add an image to the rss_post.php file
Here's the syntax I'm using but it isn't working:
<image><perch:blog id="image" type="image" width="320" height="240" /></image>
Is this the correct syntax?
Here's the syntax I'm using but it isn't working:
<image><perch:blog id="image" type="image" width="320" height="240" /></image>
Is this the correct syntax?
Yes, the syntax looks correct. Have you added it to your
post.html
template too?Hey Drew,
Thanks, yes I have. I'm trying to add the image into a Campaign Monitor template and have now learned that I need to use an RSS enclosure to pull in the image. I've managed to get it working with an absolute path to an image but not having any luck with the perch tags, any ideas? Here's the working code:
Thanks again.
James
Are the dimensions there same?
They are now :)
Still not seeing the images, here's the code I'm using to try and pull in the image from my post.html template:
<media:content src="<perch:blog id="image" type="image" width="270" height="200" />" type="image/*" />
Have you uploaded the images since changing the dimensions?
Just tried that - images are still not appearing.
Ok.. what else can you tell me?
Here's everything so far...
I'm trying to pull in an image from our post.html template using the following line of code (in a campaign monitor template):
Here's the code from my post.html template
The images work on the blog pages, but don't appear in the Campaign Monitor template.
If I use an absolute path in the above, the RSS brings the image in to the Campaign Monitor template without issue.
Therefore, the CM template and RSS tags seem to be working correctly, the issue seems to be related to the
<perch:blog id="image"
tag.I have also tried republishing pages and re-uploading images to posts when updating code but nothing has taken effect.
Do you have a snippet of code from an rss_post.php file that handles rss images as an example? Is there a known issue with Perch tags contained in a
<media:content />
tag? If so is there an alternative?Thanks Drew
What is the campaign monitor template, and how are you displaying it?
It's an HTML email template, I'm previewing it in the campaign monitor utility itself. The post title, author, date and content all appear perfectly. Can post the Campaign Monitor template code if useful?
So this isn't in Perch?
The HTML email template isn't, but there seems to be an issue with pulling in the image from the Perch rss_post.html template. I think it would be helpful to see how you might add a blog image to this template? Preferably using <media:content /> tags rather than <image></image> tags?
If you're not using Perch to display the template then Perch tags in the template won't be parsed.