have created my own module named 'Education'. I also created default views for that module like this:
function education_views_default_views(){
$view = new stdClass();
$view->name = 'education';
$view->description = '';
$view->access = array (
);
$view->view_args_php = '';
$view->page = TRUE;
$view->page_title = '';
$view->page_header = '';
$view->page_header_format = '1';
$view->page_footer = '';
$view->page_footer_format = '1';
$view->page_empty = '';
$view->page_empty_format = '1';
$view->page_type = 'node';
$view->url = 'education';
$view->use_pager = TRUE;
$view->nodes_per_page = '10';
$view->sort = array (
);
$view->argument = array (
array (
'type' => 'uid',
'argdefault' => '1',
'title' => '',
'options' => '',
'wildcard' => '',
'wildcard_substitution' => '',
),
);
$view->field = array (
);
$view->filter = array (
array (
'tablename' => 'node',
'field' => 'type',
'operator' => 'OR',
'options' => '',
'value' => array (
0 => 'education',
),
),
);
$view->exposed_filter = array (
);
$view->requires = array(node);
$views[$view->name] = $view;
return $views;
}
When I log in with admin's account, I can view content in that page with url like: www.example.com/?q=education/2 which shows me all the education content posted by user1. But when I login with user1's account, I just see a blank page with that url. Although I have also enable that default views, it doesn't work either.
I must check 'administer nodes' in access control so that normal user can view that education page created with views.
Can someone tell me what happends? And how to fix it?
I appreciate your help!
Thanks!
Comments
Comment #1
sunSorry, unfortunately this support request is way too specific. Please have a look at the issue queue - Views maintainers are buried already. You might want to try to get further support at http://drupal.org/support. Additionally, the answer to your question might be covered in the handbooks at http://drupal.org/handbook/modules/views already.
If you were able to solve this issue on your own in the meantime, you might want to add the involved steps to this closed issue, so other users searching for a similar solution might find it.