<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
</head>
<body bgcolor="#ffffff" text="#000000">
<font size="-1"><font face="Arial">I'm working on a site for a city,
and the city is broken down into it's different areas/departments.&nbsp; The
page for each department has it's own view for its main page.&nbsp; For each
piece of content, there are two taxonomy categories: one to indicate
which department it does under, and one that indicates the type of
information.&nbsp; What we need to do is have a block that shows the
relevant content of a certain type for the specific department.&nbsp; So for
instance, on the Police department page, I want to have a block that
shows content with type 'form' and a department of 'police'.&nbsp; Since
'police' is the URL for the view (i.e. mysite.com/police on the Police
page) and not an argument, I use the following code to add the view URL
as an argument:<br>
<br>
$path = $_GET['q'];<br>
$searchchar = '/';<br>
$slash = strpos($path, $searchchar);<br>
//get first item in path <br>
//if there is no '/' in $path, use $path<br>
if (strpos($path, $searchchar) === FALSE) {<br>
&nbsp; $subsite = $path;<br>
}<br>
else { //there was a slash, so we're assuming is it in the format
node/xxxx<br>
&nbsp; $part1 = substr($path, 0, $slash);<br>
&nbsp; $sql = "SELECT dst FROM {url_alias} WHERE src = '%s'";<br>
&nbsp; $alias = db_result(db_query($sql, $path));<br>
&nbsp; $subsite = substr($alias, 0, strpos($alias, $searchchar));<br>
}<br>
$args[0] = $subsite;<br>
<br>
I then have an argument that uses %1 from the URL.<br>
<br>
This code works perfectly by itself.&nbsp;&nbsp; The problem comes when I add a
filter to narrow down by type using the second taxonomy term.&nbsp; If the
filter is by content type, it works fine and both criteria are used.&nbsp;
If however, the second filter is also by taxonomy term for the type
vocabulary, then the block doesn't show at all.&nbsp; If I just use one or
the other (the argument code or the filter by type vocabulary), the
block shows up, but obviously only with more nodes displayed than I
want.&nbsp; It's almost as if the two parameters (the argument and the
filter) are canceling each other out.&nbsp; Can anyone verify if this is
true?&nbsp; Is there a better way to do what I'm trying to do?<br>
<br>
Thanks.<br>
<br>
Steve<br>
</font></font>
</body>
</html>