Hi
I would like to know is there any views filter and filed to display next content teaser in my views so that my users can see the quick glance of the next content of the same taxonomy and content type. help needed

Comments

dawehner’s picture

Priority: Critical » Normal

Updated Priority.

merlinofchaos’s picture

Status: Active » Postponed (maintainer needs more info)

What is 'next content'? Drupal has no such concept.

dawehner’s picture

I think "next content" is
sort by NID asc;
limit 1
filter by nid > current_nid

And "last content" is
sort by NID desc;
limit 1
filter by nid < current_nid

codingdeveloperdrupal’s picture

I like to display the next content's teaser of the same taxonomy in my current node. .
Suppose if i create a new content type by CCK (news). In the current node I like to display the teaser content of the next news article similar like if i view a video node i like to see the next video thumbnail image in the current video. . .

dawehner’s picture

Status: Postponed (maintainer needs more info) » Active

Update status

codingdeveloperdrupal’s picture

Hey dereine,
The problem is simple. I will try to explain as much as i can.
I have Custom pagers and prev/next module.
I got the node template and chose two layered layout. In the left content I gave current node's body, and where as in the right content i like to have the next node's teaser of the same node type and same taxonomy which i have set in view->filters. This allows the viewer to have a look upon the next node's teaser . I got a solution. I hacked the code in views handler(which is not the right way).
I edited the code in function set_argument().
this is the original code.

function set_argument($arg) {
    $this->argument = $arg;
    return $this->validate_arg($arg);
  }

I edited this into

function set_argument($arg) {
if(arg(0)=="node"){
//theming to pass the arguments for displaying next content
$nodeidtype=db_query("select type from {node} where nid='$arg'");//getting the My_type article article
while($fetchtype=db_fetch_array($nodeidtype))

{
  $type=$fetchtype['type'];
}
if($type=="my_type")
{
	$nextelement=db_query("select nid from {node} where type='my_type' and nid<$arg ORDER BY nid DESC limit 0,1");//getting the my_type
	while($fetch=db_fetch_array($nextelement))

	{
 		$nextnid=$fetch['nid'];
		$extra =$nextnid-$arg;
	}

	if(!isset($nextnid))//to display the first article in the last node (rotate it to first article on the last node)customisation
	{
		$firstelement=db_query("select nid from {node} where type='my_type' ORDER BY nid DESC limit 0,1");
		while($fetch_first=db_fetch_array($firstelement))

		{
			 $firstnid=$fetch_first['nid'];
			 $extra =$firstnid-$arg;
		}
	}
}
$this->argument = $arg+$extra; // remove anything other than $arg if present for original
return $this->validate_arg($arg+$extra); // remove anything other than $arg if present for original
}else{$this->argument = $arg; // remove anything other than $arg if present for original
return $this->validate_arg($arg);}
}
codingdeveloperdrupal’s picture

I will attach screenshot of that page.

esmerel’s picture

Status: Active » Closed (fixed)

No activity for more than 6 months

codingdeveloperdrupal’s picture

StatusFileSize
new348 bytes