Show most recent newsletter online

Hi All,

Hopefully I'm posting in the right spot.. I wasn't able to find what I was after with searching.

I'm brand new to CM and so far love it.. very user friendly.. great stuff. I'm a reasonably tech savvy end user, not a web designer/developer.. so please be gentle..

Now.. to my problem.

I understand I am able to show a list of previous campaigns on my website, and can choose if I want to show only the most recent, top 5, top 10 etc.. this is fine.

I also understand I am able to manually source the URL to the most recent, or any previous campaigns to share with a friend, on facebook etc.

What I haven't been able to figure out though, is there a way to display the most recent campaign on my website without having to manually source the URL each time and change my site?

Essentially I am after a 'set and forget' solution so that the current issue of my newsletter is always displayed online, along with a list of campaigns...

Can someone please help out?

Thanks in advance!

Adam

ads, 5 years ago

*bump*

Is anyone able to assist?

Thanks
Adam

roshodgekiss roshodgekiss, 5 years ago

Hi ads, we're really sorry that we missed your earlier post there. The bad news is that there isn't a 'set and forget' way of linking to your most recent campaign in this manner, I'm sorry to say. I totally agree that it would be very useful to have a link that dynamically points to the last campaign sent, so I've added your vote internally and will most certainly let you know if we work this into an upcoming release.


Get in touch with us on Twitter: http://twitter.com/campaignmonitor
We're also on Facebook: http://facebook.com/campaignmonitor
JonJoyce, 5 years ago

You could quite easily do this, are you using any javascript library, jquery perhaps?

First, log into CM > choose the client > Client Settings > Create newsletter archive.
Display latest newsletter > Most recent first.

Grab the javascript link it gives you...
for example:

<script type="text/javascript" src="http://learningassistant.createsend.com/t/r/p/xhre/1/1/0/0/1/"></script>

Then you can grab the link, use a bit of jquery to grab the url and do anything you want with it...

http://jsfiddle.net/bvuqy/
Click Run.

Hope this helps.

Jon


Jonathon Joyce

http://www.jonathonjoyce.co.uk/projects/campaign-monitor-cfc/
http://campaignmonitorcfc.riaforge.org/
ads, 5 years ago

Thanks all for your posts.

All makes sense to me, I will show it to my developer and hopefully it makes sense to him too!!

Much appreciated.

Adam

boldprint boldprint, 4 years ago

JonJoyce this information is VERY helpful - but I am new to this type of scripting and need just a little more info if someone could PLEASE help me out I would be very appreciated - and I think it is something many CM users could benefit from.

What I would like to do is not create another link to the latest newsletter, but instead pull the URL to the latest newsletter and use it as the source for an iFrame.

When I look here: http://jsfiddle.net/bvuqy/

I see what you have done to create the dynamic link to the newsletter. I tried to edit it, though, and did this:

http://jsfiddle.net/boldprint/DzVYK/

Where I simply replaced your HTML used to create the new link and instead tried to create an iframe.

This didn't work. I then also tried to change anywhere you had attr('href') to instead be attr('src') - but as you can tell I am grasping for anything to work... and this is not the answer!

The fiddle program tells me I need to use the POST command, but I don't know how.

Could anyone please help me out - what I need is the HTML & JS to use to query the "latest newsletter URL" returned from the Campaign Monitor script, and use this URL as the source of an iFrame.

Any suggestions?

THANK YOU!!
Susan

terryt terryt, 4 years ago

Hi Susan,

The reason http://jsfiddle.net/boldprint/DzVYK/ is not working is because you cannot have the same ID for two different elements on a page.  You have "latest-newsletter-link" as the ID of both the link AND the iframe.  Change the iframe to something like "latest-newsletter-frame" and update the javascript to set the "src" accordingly.  Here is a working example:

http://jsfiddle.net/DzVYK/1/

Hope that helps!

Thanks,
Terry


Terry Tice
Campaign Monitor

Join 200,000 companies around the world that use Campaign Monitor to run email marketing campaigns that deliver results for their business.

Get started for free
1-888-533-8098