
[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
[ic] passing category id to next page - 3-level category tree
HI THERE!
Continuing the problems with 3-level categorty tree. I built a database with
such a strucrture:
"id" "name" "parent_id"
1 skiing 0 |----skiing
2 skis 1 |
|-------skis
3 boots 1 | |
|-----racing
4 googles 1 | |
|-----slalom
5 racing 2 | |
|-----kids
6 slalom 2 | |
7 kids 2 |
|-------boots
8 snowdoarding 0 |
|-------googles
9 boards 8 |
10 boots 8
|-----snowboarding
11 softboots 10 |
|-------boards
12 hardboots 10 |
|-------boots
|
| |----softboots
|
| |----hardboots
Ok, now, on the main page of the catalog I would like to display a list of
categories with parent_id=0 (skiing, snowbaoarding in this example). Cat
names should be links to "next page" - content, dynamicly built page for
selected "main" category.
Main PAge:
Choose the category:
skiing
snowboarding
mountain biking
etc.
Could you give me an ide idea of the [loop] code with appropriate search
params to do that (I think I could figure it out, just didn't get down to
the code, busy with planning so far).
But my main problem is - how to pass a chosen category "id" to the next
page - main page for the category (dynamicly generated - skeleton like
flypage) which content should be built totaly based on the selected category
"id". At best i would like to have the chosen cat_id stored in session for
further referal.
"Next page" _ Skiing
skis
racing
slalom This page would appear after
choosing skiing in main page
kids
googles
boots
"Next page" -
Snowboarding
boards
boots This page would appear after choosing
snowboarding in main page
softoots
hardboots
Code examples would be graetly appreciated, as I am a newbie to Interchange,
learning it hard.
Regards,
Lukasz Z
_______________________________________________
interchange-users mailing list
interchange-users@interchange.redhat.com
http://interchange.redhat.com/mailman/listinfo/interchange-users