2011-02-03 94 views
0

我使用jCarousel构建了显示在块中的幻灯片。内容类型具有图像上传域和这些图像将要在转盘显示量。我想,每一个节点在传送带上不同的图像。在Views中,我通过Type定义了过滤器。但是,这需要来自每个节点的所有图像。我该如何解决这个问题?使用jCarousel模块构建幻灯片

回答

0

您想通过该页面上传到特定网页上的图像?

如果是这样,你可以使用节点:NID参数。

在“采取的措施,如果参数不存在:”

检查“提供默认参数”

然后“节点从URL ID”

+0

非常感谢!这解决了我的问题。 :) 还有一件事。我如何分别设置幻灯片样式。例如,在一个类型的页面我需要的幻灯片是960像素宽,另一种类型的600px的。 – eXoSaX 2011-02-03 16:32:24

0

下面是有关的template.php评论更多信息:

在page.tpl.php中添加

<body class="<?php print $body_classes; ?>">

in template.php,add

function phptemplate_preprocess_page(&$vars, $hook) { 
    // Classes for body element. Allows advanced theming based on context 
    // (home page, node of certain type, etc.) 
    $body_classes = array($vars['body_classes']); 
    if (!$vars['is_front']) { 

     // Add unique classes for each page and website section 
     $path = drupal_get_path_alias($_GET['q']); 
     list($section,) = explode('/', $path, 2); 
     $body_classes[] = phptemplate_id_safe('page-' . $path); 
     $body_classes[] = phptemplate_id_safe('section-' . $section); 
     if (arg(0) == 'node') { 
     if (arg(1) == 'add') { 
      if ($section == 'node') { 
      array_pop($body_classes); // Remove 'section-node' 
      } 
      $body_classes[] = 'node-add'; // Add 'node-add' 
     } 
     elseif (is_numeric(arg(1)) && (arg(2) == 'edit' || arg(2) == 'delete')) { 
      if ($section == 'node') { 
      array_pop($body_classes); // Remove 'section-node' 
      } 
      $body_classes[] = 'node-' . arg(2); // Add 'node-edit' or 'node-delete' 
     } 
     } 
    } 
    $vars['body_classes'] = implode(' ', $body_classes); // Concatenate with spaces 
    } 

    function phptemplate_id_safe($string) { 
    if (is_numeric($string{0})) { 
     // If the first character is numeric, add 'n' in front 
     $string = 'n'. $string; 
    } 
    return strtolower(preg_replace('/[^a-zA-Z0-9_-]+/', '-', $string)); 
    }