Hi Guys,
Im developing a Drupal based website, combined with Views and CCK. On the frontpage I have placed a View for Images with AJAX Paging enabled. Strangely the AJAX pagination works when I preview the View but it does not work on the Home Page. I also noticed that this was working previously ie. AJAX pagination was working perfectly but now its just stopped! Ive put up the development site on this Server: http://www.livebrain.co.uk
And I am also providing the Export of that VIEW to get better understanding. I dunno whats wrong here? Maybe one of you guys can help.. Thanks in advance:
$view = new view;
$view->name = 'front_image_gallery';
$view->description = 'Front gallery slideshow';
$view->tag = '';
$view->view_php = '';
$view->base_table = 'node';
$view->is_cacheable = FALSE;
$view->api_version = 2;
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
$handler = $view->new_display('default', 'Defaults', 'default');
$handler->override_option('fields', array(
'field_image_fid' => array(
'label' => '',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'strip_tags' => 0,
'html' => 0,
),
'link_to_node' => 0,
'label_type' => 'none',
'format' => 'image_plain',
'multiple' => array(
'group' => 0,
'multiple_number' => '',
'multiple_from' => '',
'multiple_reversed' => 0,
),
'exclude' => 0,
'id' => 'field_image_fid',
'table' => 'node_data_field_image',
'field' => 'field_image_fid',
'relationship' => 'none',
),
'field_image_data' => array(
'label' => '',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'strip_tags' => 0,
'html' => 0,
),
'link_to_node' => 0,
'data_key' => 'title',
'exclude' => 0,
'id' => 'field_image_data',
'table' => 'node_data_field_image',
'field' => 'field_image_data',
'relationship' => 'none',
),
));
$handler->override_option('filters', array(
'status' => array(
'operator' => '=',
'value' => '1',
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'id' => 'status',
'table' => 'node',
'field' => 'status',
'relationship' => 'none',
),
'type' => array(
'operator' => 'in',
'value' => array(
'frontgallery' => 'frontgallery',
),
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'id' => 'type',
'table' => 'node',
'field' => 'type',
'relationship' => 'none',
),
));
$handler->override_option('access', array(
'type' => 'none',
));
$handler->override_option('cache', array(
'type' => 'none',
));
$handler->override_option('use_ajax', TRUE);
$handler->override_option('items_per_page', 1);
$handler->override_option('use_pager', 'mini');
Comments
Comment #1
dawehnerHow do you embed the view into the frontpage?
I guess you do it directly in the page.tpl.php, so the css/js addition cannot work. Better use a block
Comment #2
anithegregorian commentedYatzi! your right man!
I had to use blocks instead of views_embed_view function that solves the problem! Gracias!
Thanks a lot...
Regards,
Comment #3
dawehnerSo this is solved.
Comment #4
aleksdj commentedBut Im using twitter Block from the Twitter view (added in panel) and Ajax Pager doesnt work! :-S, it only works in preview query as the other user said.
Does it relate with themes? Im not using the default theme, Im using aqua_prosper... How can I add the css/js code manually?
Comment #5
merlinofchaos commentedWhen I click on the link you provided, the ajax paging appears to work.