Page 1 of 1

how to split elements of rss feed

Posted: Fri Feb 13, 2015 10:53 am
by David wyatt

Hi,

Im trying to create an app that uses rss feeds. When i follow the tutorial i get all the elements (articles in a list) but the links are generated from one and link to the feeds website. I want the links to load a page inside the app. By not mapping the service to the grid I have managed to get the first element to work, the issue is i cant see the other elements. Is there a way to link each element from the same rss feed to different componenets?

Thank you Image


how to split elements of rss feed

Posted: Sat Feb 14, 2015 12:10 am
by Illya Stepanov

Hi David -

Sorry, not sure I understand what other element you can't find here:
[quote:]
By not mapping the service to the grid I have managed to get the first element to work, the issue is i cant see the other elements.
[/quote]

[quote:]
Is there a way to link each element from the same rss feed to different componenets? [/quote]
You have a response from your service and you can map the response to the different components on the page.


how to split elements of rss feed

Posted: Sat Feb 14, 2015 8:07 am
by David wyatt

Hi Stepanov, thank you for the help.
I'm trying to build a news app. When i followed the tutorial all the articles appear but the link generated takes you to the website. I want the link to each article to go to different pages inside the app. The issue is you map to one component in a grid which then duplicates for all the articles.
If I dont map to the grid I only get the first article, how do I then map the second article to its own components?


how to split elements of rss feed

Posted: Mon Feb 16, 2015 1:03 pm
by Evgene Karachevtsev

Hello David,

Could you please show us screenshot of your mapping?


how to split elements of rss feed

Posted: Mon Feb 16, 2015 4:47 pm
by David wyatt

HI,

I have only mapped to the components not the grid at the moment.
I was thinking i could map to the grid but use the following javascript toonly show the second article
if (count !=1 {
element.hide();
} else {
count++;
}
with count being set to zero, this way it should hide all articles except the second one
Image


how to split elements of rss feed

Posted: Mon Feb 16, 2015 6:56 pm
by David wyatt

HI,

looks like i managed to get it too work. instead of

if (count !=1) {
element.hide();
} else {
count++;
}

i used

if (count ==0 {
element.hide();
count++;
} else if (count ==2 {
element.hide();
} else {
count++;
}

to do third article it was

if (count ==0 {
element.hide();
count++;
} else if (count ==1 {
element.hide();
count++;
} else if (count ==3 {
element.hide();
} else {
count++;
}


how to split elements of rss feed

Posted: Mon Feb 16, 2015 7:13 pm
by Illya Stepanov

Thanks for the update, David.