limit characters returned in rss detail feed

This forum contains topics that were moved from Get Satisfaction
Simon Toon
Posts: 0
Joined: Mon Jul 20, 2015 9:23 am

limit characters returned in rss detail feed

Post by Simon Toon »

I have followed the "Build an RSS App" tutorial and it works wonderfully.

What I would like to do is limit the amount of characters that come back from the "description" mapping into the HTML component on the app page and then proved a "Read More......" link that then takes the user to the website to read the rest of the article. Therefore giving the first few lines of the article and giving the option to read the whole article direct from the website - keeping the app cleaner.

Is there a way to do this?

Pavel Zarudniy
Posts: 0
Joined: Mon Jul 06, 2015 8:56 am

limit characters returned in rss detail feed

Post by Pavel Zarudniy »

Hi Simon,
You need to use JS on mapping - https://devcenter.appery.io/documenta...
With JS code save two parts of content and then display one or other

Simon Toon
Posts: 0
Joined: Mon Jul 20, 2015 9:23 am

limit characters returned in rss detail feed

Post by Simon Toon »

Hi Pavel,

Thanks for the quick answer. Can you give me any hint on how to do this.....if I wanted to display the first 250 characters from the description for example.

Many Thanks

Simon

Pavel Zarudniy
Posts: 0
Joined: Mon Jul 06, 2015 8:56 am

limit characters returned in rss detail feed

Post by Pavel Zarudniy »

I think you need to use method like this - http://www.w3schools.com/jsref/jsref_...

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

limit characters returned in rss detail feed

Post by Yurii Orishchuk »

Hi Simon,

It's simply to restrict any string with following JS code:

pre

var str = "hello world";
var restrictedStr = str.substr(1, 5);
console.log(restrictedStr);

/pre

See details about "substr" method here: http://www.w3schools.com/jsref/jsref_...

Regards.

Post Reply