Drupal Views

Zyxware default image4
| 1 min read
You have created a Drupal View as a page and the View is working correctly as intended in the preview section in the View settings page. However when you visit the actual page it throws up a 'Page cannot be displayed' error after you had clicked on the View button on the Views settings page. So what is causing the problem and what could be the fix? Read on to see the solution. -->
Zyxware default image3
| 2 min read
If your Drupal site has some content which is restricted to certain users using hook_node_access you might find that the Views you create might bypass these hook_node_access restrictions granting unauthorized users complete access to view the content. The permissions might come into place only when the users click on the title of the node. If you need to know how to fix this, read on.
Zyxware default image1
| 2 min read
If you are creating a View using the Drupal Views module and if you want to filter nodes based on nids (Node > NID filter) then Views gives you options to filter it based on a single argument of the nid. Currently there is no direct way to have multiple nid filters in Views similar to "Is one of" for Taxonomy. However there is a workaround to achieve that. Read onto find out more.
Zyxware default image4
| 2 min read
Some Drupal users have reported that there was a conflict with an external Jquery script and the Views Ajax. This occured when the Drupal user wanted to use the external script for some specifc purpose. The conflict was causing the Views UI to break. If you are experiencing this issue in your Views read on to find out the solution.
Zyxware default image1
| 2 min read
Some Drupal Views users have encountered a Page not found error when they tried to navigate to the new Views Page files display they had created. This occurred after the preview page worked correctly and showed the correct test file in the table. It is not very clear what causes this error in the first place but there are multiple actions you can take to fix it. Read on to find out more.
Zyxware default image2
| 2 min read
Drupal Gmap module is a very useful module for embedding the functionality of Google Maps in your website. Currently the only way to access this map is to go to the "yoursitee.com/map/node and find all the relevant info on a single map. There is no direct way to access i location nodes on a single map, inside a block or panel pane, or on pages other than yoursitee.com/map/node. However there is a workaround for this. Read on to find out more.
Zyxware default image2
| 2 min read
Drupal Views can be displayed as both blocks and pages. If you want the View to be embedded in a node in your Drupal site then the obvious choice would be to display it as a block. View blocks can be embedded in a node as any other block by calling a set of functions like block_load and drupal_render. However it is not directly possible to pass contextual filters as arguments to those functions if your View uses them. Read on to find out how to pass contextual filters to a View embedded in a node.
Zyxware default image2
| 2 min read
This is how you would normally render a view display passing filter inputs via code: $view = views_get_view('view-name'); $view->set_display('display-name'); $view->is_cacheable = FALSE; $filter_1 = $view->get_item('display-name', 'filter', 'filter_1_id'); $filter_2 = $view->get_item('display-name', 'filter', 'filter_2_id'); $filter_1['value'] = "value1"; $filter_2['value'] = "value2"; $view->set_item('display-name', 'filter', 'filter_1_id', $filter_1); $view->set_item('display-name', 'filter', 'filter_2_id', $filter_2); dpm($view->render());
Zyxware default image2
| 2 min read
On one of the maintenance projects we got we came across a page that used to take around 11 seconds to load. The page was a views listing for users. We were able to speed up the page load times from around 11 seconds to under 3 seconds by taking out just the distinct option used in the view. The following was the select query that was originally generated from the view with the time logged by views in the preview panel.
Zyxware default image2
| 4 min read
In every operating system, there are a lot of tasks that need to be scheduled to run at a particular time - some, very often (as in, every 5 minutes), and some, less (like, once every month). For a quick example, you might want to run a temporary files deletion operation at midnight each day - this is where you need to write a cron job.Crontab and Cron jobs are Linux’s version of a complete job scheduling system.Let us see these in detail.
Zyxware default image4
| 3 min read
Views is one of the most complex of all Drupal modules and one of the most useful of all Drupal modules. The only downside is that, since it is very complex, not too many people have been able to contribute to the documentation of the module. If you search Google for finding out how to programmatically set a filter in Views2 you probably wouldn't find any help. Here is how you do it.
Zyxware default image4
| 3 min read
Feed API provides a powerful means of importing feeds from other sites directly into your Drupal site. What if you want to export your feed as an XML file to a content distributor who wants it on his FTP site? There is of course the traditional approach of using curl to read your feed URL and dump the text as files on to the ftp site. There is not much control that you have over this process. However doing this via Drupal Views will give you fine grained control over the process