Displaying similar nodes

后端 未结 3 678
花落未央
花落未央 2021-01-29 04:25

I\'ve somewhat ran in to a problem with Drupal today.

I would like to display a node (Product) on a page, and below that node, I\'d like to display 3 similar nodes (Pro

3条回答
  •  故里飘歌
    2021-01-29 05:02

    Override your node view with panels. And create a view block with 'taxonomy id argument', you need to choose default argument options as PHP Code and place this code.

    $node = node_load(arg(1));
    if($node) {
        foreach($node->taxonomy as $term) {
            $term = $term->tid;
            return $term;
        }   
    }
    

    I just launched a site using panels + views magic. http://sgigulf.org/culture/synopsis-of-performers-showcased-by-sgi-gulf

提交回复
热议问题