Node relations (one content type) Question: I have a content type "VIDEOS" and have added 20 videos - 1 through 20. I want to achieve a functionality like if you are watching video x, the next 3 videos are showing in the sidebar, example -> when you are watching video 2 in a block in the sidebar videos 3, 4, 5 are showing up. When you watch video 7 - in the sidebar videos 8, 9 10 are showing up and so on.
Any ideas? I know it will be done somehow with Views but cannot figure it out.

BR, Ivan Ivanov
I would do that with a little code in a custom module...

For the purposes of this example my module is called misc, but replace everywhere is says misc with the name of your your module.

First create a block:

function misc_block_info() {
    $blocks['next_four'] = array(
        'info' =&gt; t('Show the next 4'),
        'cache' =&gt; DRUPAL_CACHE_PER_ROLE,
    );
    return $blocks;
}


And then define where it's content comes from:

function misc_block_view($delta = '') {
    switch ($delta) {
        case 'next_four':
            $block['subject'] = '';
            $block['content'] = next_four();
            break;

    }
    return $block;
}


And then define the content of the block:

function next_four() {
    $output = '';
    if(arg(0)=='node') {
        $node = node_load(arg(1));
        $query = db_select('node', 'n')
            -&gt;fields('n', array('nid'))
            -&gt;condition('n.type', $node-&gt;type)
            -&gt;condition('n.status', 1)
            -&gt;condition('n.nid', $node-&gt;nid, '&gt;')
            -&gt;range(0, 4)
            -&gt;orderBy('n.nid', 'ASC');
        $nids = $query-&gt;execute()-&gt;fetchCol();
        $nodes = node_load_multiple($nids);

        $output .= '&lt;ul&gt;';
        foreach($nodes as $node) {
            $output .= '&lt;li&gt;&lt;a href="'.drupal_get_path_alias('node/'.$node-&gt;nid).'"&gt;'.$node-&gt;title.'&lt;/a&gt;&lt;/li&gt;';
        }
        $output .= '&lt;/ul&gt;'; 
    }
    return $output;
}


What this code does is:


Take the nid of the current node
Does a query to get more nodes of the same type with an nid height than the current page.
Loads each node and outputs the node title, with a link to the node.


This will work for any content type. If your HTML is going to be any more complex than this then I would suggest using the hook_theme function to create a template file for your block.