While i m trying to replace the default node listing title by image grid, i m faced with empty list.

here is the following code.

/**
 * The jQM pageshow callback for the node listing page.
 */
function node_page_pageshow() {
  try {
    // Grab some recent content and display it.
    views_datasource_get_view_result(
      'drupalgap/views_datasource/drupalgap_content', {
        success: function(content) {
          // Extract the nodes into items, then drop them in the list.
          var items = [];
          for (var index in content.nodes) {
              if (!content.nodes.hasOwnProperty(index)) { continue; }
              var object = content.nodes[index];
              items.push(l(object.node.image, object.node.image, 'node/' + object.node.nid));
          }
          drupalgap_item_list_populate('#node_listing_items', items);
        }
      }
    );
  }
  catch (error) { console.log('node_page_pageshow - ' + error); }
}

Can you please advise on how best can I display the images ?

Comments

afidegnum created an issue. See original summary.

tyler.frankenstein’s picture

Status: Active » Postponed (maintainer needs more info)

I really have to advise against the approach you are taking. It is ill advised to hack DrupalGap core. It would really be best for you to learn how to make a custom DrupalGap module, then learn how to use a Views Render Array to much more easily have control over your application: