Using similarbyterms with patch applied and views 3 (and Drupal 6), I have the following default argument to allow me to embed the views on none node pages -

if (arg(0) == 'node') {
return arg(1);
}
else {return 21;}

'21' is currently a temporary number while I develop the site. I want to change this to 'all' so that on none node pages it essentially displays recent items as opposed to similar items.

With the wildcard correctly set I have tried -

if (arg(0) == 'node') {
return arg(1);
}
else {return all;}

And have tried -

if (arg(0) == 'node') {
return arg(1);
}
else {return 'all';}

Is this not possible with similarbyterms or am I missing something?

Thanks very much!
Rob

Comments

shelane’s picture

Issue summary: View changes
Status: Active » Closed (outdated)

If this is still an issue in the 8.x branch, create a new issue.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.