Page 1 of 1

limit characters returned in rss detail feed

Posted: Mon Jul 20, 2015 9:23 am
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?


limit characters returned in rss detail feed

Posted: Mon Jul 20, 2015 11:40 am
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


limit characters returned in rss detail feed

Posted: Mon Jul 20, 2015 12:28 pm
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


limit characters returned in rss detail feed

Posted: Mon Jul 20, 2015 1:58 pm
by Pavel Zarudniy

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


limit characters returned in rss detail feed

Posted: Thu Jul 23, 2015 1:29 am
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.