I’ve a content material kind with two fields: Exterior Pictures and Inside Pictures
Each of those fields are Limitless Values – so Drupal Development Company person can add as many photos as they need to exterior and inside. Screenshots: http://prntscr.com/a9m8o5 http://prntscr.com/a9m8uc
Now I am attempting to create a view that grabs all exterior and inside photos uploaded and shows them.
Drupal Development Company solely manner I can discover to have every picture displayed as its personal particular person discipline and row is to carry out a UNION betwen one thing like SELECT exterior UNION SELECT inside and so on. and so on. however I simply can’t appear to determine Drupal Development Company relaxation.
I’ve tried creating two views and mixing them like this:
perform pgallery_views_pre_execute(view &$view){ if ($view->title == 'photo_gallery'&& $view->current_display == 'page_1') { // View 1 accommodates Inside Pictures $view1 = views_get_view('photo_gallery'); $view1->construct('block_1'); $query1 = $view1->build_info['query']; // View 2 accommodates Exterior Pictures $view2 = views_get_view('photo_gallery'); $view2->construct('block_2'); $query2 = $view2->build_info['query']; $query1->union($query2); $view->build_info['query'] = $query1; } }
however it will not render no matter is in $query2 – it simply repeats $query1 values. So I get Drupal Development Company right variety of “rows” from Drupal Development Company end result however it repeats Drupal Development Company information for some cause. Please assist!