mavtech
Posts: 133
|
Posted: 06/03/2004, 11:50 AM |
|
I would like to filter the directory data based on the category_id.
I am trying to use the SubcategoryLink.
I have change the control Souce type to "Database Expression"
And what I want to do is use the current category_id to filter which subcategories are displayed.
Select sub_category_name from sub where sub_category_id = {category_id}
I am not an sql expert in the least and I can't seem to get it working.
End result would be a directory that only shows subcategories for currently chosen category.
Paul
|
|
|
peterr
Posts: 5971
|
Posted: 06/03/2004, 2:36 PM |
|
Possibly I misunderstood your question but this seems to be the standard functionality of the Directory Component and shouldn't require any changes.
For example if you go to http://examples.codecharge.com/ExamplePack/Directory/Directory.php and select the Category "Automotive" then you will arrive at the page http://examples.codecharge.com/ExamplePack/Directory/Di...p?category_id=1 , which lists only the subcategories for the selected "Automotive" category. Or if you drill down the categories to the "Computers and Internet > Software" category, then you will see a grid that displays only the records for the selected category/subcategory.
I'm not sure if you had problems with replicating any of this functionlity? For the Directory itself or the Grid?
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
|
|
mavtech
Posts: 133
|
Posted: 06/04/2004, 6:22 AM |
|
her is what I am sort of looking for:
Automotive
Subcat 1
Subcat 2
Computers
Subcat 1
subcat 2
but when I hit automotive i get
Automotive
Subcat 1
Subcat 2
Computers
Notice no subcat on Computers.
I am after that when I hit Automotive from the directory current category_id would change. Then in the program it would filter to only show top items as well as only subcategories with parent category equal to current category.
Paul
|
|
|
|