rgreen3400
Posts: 0
Joined: Sun Feb 17, 2013 4:03 pm

list detail from query

Hi,
I am trying to build a simple FAQ using a tablet split screen template - so we have two columns "question" "answer".

I've figured out how to show the answer(s) on the detail side (set detail content), but the answer side lists all the answers versus the single question. (I am using a list component on the "answer details" page.

My strategy was to save the _id of the question as a local variable and to use the _id to query and display the single answer versus the list of all.

if that is the correct way, how do I execute on the query on the "answer page"? any tutorial or other example?? thanks

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

list detail from query

Hello! You can use JS to show/hide needed elements. For example if you use List on "answer details" page and know list item name use this code:
codevar listName = "mobilelistName&quot //here is your mobilelist name
var itemName = "mobilelistitem2&quot //name of the item that will not hide. get this value from local storage for example
var $list = Appery(listName);
$list.find("li").hide();
$list.find('[dsid='+itemName+']').parents('li').show();
$list.listview('refresh');/code

Return to “Issues”