Hooks and Handlers

You have to tell Views about your tables using a hook. Views offers 3 hooks:

<?php
    hook_views_tables
();
    
hook_views_arguments();
    
hook_views_default_views();
?>

In addition, Views also supports handlers for a number of tasks, making it possible to customize the behavior of fields when being used. The handlers take various kinds of data, and some of them even allow direct access to the query building object. Care must be used to ensure that manipulating that object doesn't cause the query builder to write SQL that won't parse!

0
Your rating: None
    <?php

    // views_invalidate_cache();

    $terms=taxonomy_get_tree(1);

    foreach($terms as $term){
      if(isset(
    $term->name)){

        $args[0]=$term->name;
        
    $view_listOfGroupeNode=views_get_view('articles_by_themes');
        
    $view_listOfGroupeNode->set_arguments($args);
        
    $view_listOfGroupeNode->set_items_per_page(3);
        
    $view_listOfGroupeNode->set_items_per_page(3);
        
    $view_listOfGroupeNode->set_display('block_2');
        
    $view_listOfGroupeNode->execute_display();
        if(
    count$view_listOfGroupeNode->result )){
          echo 
    '<li>';
          echo 
    '<span class="title">'.$term->name.?>

Version Drupal5:

<?php
global $current_view;
print 
$current_view->args[0];
?>

Version Drupal6:

<?php
$view 
views_get_current_view();

$first_arg$view->args[0]; 

$current_view_name $view->name

$current_view_display $view->current_display
?>