Hi Lisa, I had managed to get some sort of category filtering accomplished via the .leftnav template using
<li>Category</li>
<ul>
<li><a href="http://{path=">Copy</a></li>
<li><a href="http://{path=">Database</a></li>
<li><a href="http://{path=">Flash</a></li>
<li><a href="http://{path=">HTML</a></li>
</ul>
</ul>
However, if I want this bug tracker to have more than 1 weblog (each client would be restricted to their own weblog), I need to filter categories using the filter_by template otherwise it will give me all entries under those particular categories regardless of weblog.
How do you suppose I go about doing this? I gave it a shot using the filter by severity and status as a blueprint but it didn’t work.
See the section under {!-- Filter Reported Bugs by Category --} for my attempt at getting this to work:
{html_begin}
{embed="bug_tracker/.head" title="Bug Tracker - {segment_4} {segment_3}"}
<body>
<div id="container">
{embed="bug_tracker/.banner"}
{embed="bug_tracker/.leftnav"}
<div id="content">
{!-- Filter Reported Bugs by Severity --}
{if segment_3 == "severity" OR segment_3 == "assignment"}
{exp:weblog:entries weblog="{bug_tracker_weblog}" limit="30" status="Open|New|Closed|Fixed" sort="desc" search:bug_tracker_{segment_3}="={segment_4}" dynamic="off"}
{if no_results}
{if segment_3 != "assignment"}
No bugs of {segment_4} {segment_3}.
{if:elseif segment_3 == "assignment"}
There are no bugs assigned to {segment_4}.
{/if}
{/if}
{if count == "1"}
{if segment_3 != "assignment"}
<h3>Filtering by {segment_4} {segment_3}</h3>
<p>{if:elseif segment_3 == "assignment"}</p><h3>Bugs assigned to {segment_4}</h3>
<p>{/if}<br />
<table><br />
<tr><br />
<th>ID</th><br />
<th>Status</th><br />
<th>Category</th><br />
<th>Description</th><br />
<th>Date</th><br />
</tr><br />
{/if}<br />
<tr><br />
<td><a href="http://{permalink=bug_tracker/bug_detail}?id={entry_id}">{entry_id}</a></td><br />
<td>{status}</td><br />
<td>{categories}{category_name}{/categories}</td><br />
<td>{title}</td><br />
<td>{entry_date format="%m/%d/%y"}</td><br />
</tr><br />
{if count == total_results}<br />
</table><br />
{/if}<br />
{/exp:weblog:entries}<br />
{/if}</p>
<p>{!-- Filter Reported Bugs by Status --}</p>
<p>{if segment_3 == "status"}<br />
{exp:weblog:entries weblog="{bug_tracker_weblog}" limit="30" status="{segment_4}" sort="desc" dynamic="off"}<br />
{if no_results}<br />
No{segment_4} bugs.<br />
{/if}<br />
{if count == "1"}</p><h3>Filtering by {segment_4} {segment_3}</h3>
<p><table><br />
<tr><br />
<th>ID</th><br />
<th>Status</th><br />
<th>Category</th><br />
<th>Description</th><br />
<th>Date</th><br />
</tr><br />
{/if}<br />
<tr><br />
<td><a href="http://{permalink=bug_tracker/bug_detail}?id={entry_id}">{entry_id}</a></td><br />
<td>{status}</td><br />
<td>{categories}{category_name}{/categories}</td><br />
<td>{title}</td><br />
<td>{entry_date format="%m/%d/%y"}</td><br />
</tr><br />
{if count == total_results}<br />
</table><br />
{/if}<br />
{/exp:weblog:entries}<br />
{/if}</p>
<p>{!-- Filter Reported Bugs by Category --}</p>
<p>{if segment_3 == "categories"}<br />
{exp:weblog:entries weblog="{bug_tracker_weblog}" limit="30" categories="{segment_4}" sort="desc" dynamic="off"}<br />
{if no_results}<br />
No{segment_4} bugs.<br />
{/if}<br />
{if count == "1"}</p><h3>Filtering by {segment_4} {segment_3}</h3>
<p><table><br />
<tr><br />
<th>ID</th><br />
<th>Status</th><br />
<th>Category</th><br />
<th>Description</th><br />
<th>Date</th><br />
</tr><br />
{/if}<br />
<tr><br />
<td><a href="http://{permalink=bug_tracker/bug_detail}?id={entry_id}">{entry_id}</a></td><br />
<td>{status}</td><br />
<td>{categories}{category_name}{/categories}</td><br />
<td>{title}</td><br />
<td>{entry_date format="%m/%d/%y"}</td><br />
</tr><br />
{if count == total_results}<br />
</table><br />
{/if}<br />
{/exp:weblog:entries}<br />
{/if}</p>
<p>{!-- End Bug List --}</p>
<p></div><br />
{embed="bug_tracker/.footer"}<br />
</div><br />
{html_end}
Any idea what’s going on?