开发者

Drupal programmatic view block output fault

I am attempting to load some pages within my latest dynamically via AJAX.

To this end, I am experimenting with load my views generated block programmatically. By default, the block contains images carouselling around using the views slideshow plugin.

I am using the following code snippet:

<?php
        $view       =   'pagetopimage';
        $block_id   =   'block_1';
        $args  开发者_StackOverflow中文版     =   array(32);
        print views_embed_view( $view, $block_id, $args );
    ?>

Using the code above, the block gets printed but the carouselling effect is broken. How might I fix this?


to load the file when it's in the modules place, use:

drupal_add_js(drupal_get_path('module', 'your_module_name') .'/daFile.js');

to load in general (starting from the install root), use:

drupal_add_js('misc/ajax.js');

drupal_add_js is very powerful, see yourself ..

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜